Tabnine Logo
SInstance.getDictionary
Code IndexAdd Tabnine to your IDE (free)

How to use
getDictionary
method
in
org.opensingular.form.SInstance

Best Java code snippets using org.opensingular.form.SInstance.getDictionary (Showing top 20 results out of 315)

origin: org.opensingular/singular-form-core

private SDictionary dictionary() {
  return root.getDictionary();
}
origin: org.opensingular/form-core

private SDictionary dictionary() {
  return root.getDictionary();
}
origin: org.opensingular/singular-form-wicket

public SType<?> getType(SInstance instance) {
  return typeName == null ? null : instance.getDictionary().getType(typeName);
}
origin: org.opensingular/form-wicket

public SType<?> getType(SInstance instance) {
  return typeName == null ? null : instance.getDictionary().getType(typeName);
}
origin: org.opensingular/singular-form-core

@Nullable
@Override
public final <T> T getAttributeValue(@Nonnull AtrRef<?, ?, ?> atr, @Nullable Class<T> resultClass) {
  return getAttributeValue(getDictionary().getAttributeReferenceOrException(atr), resultClass);
}
origin: org.opensingular/singular-form-core

/**
 * Looks for the best match implementation of the aspect being request.
 * <p>To understand the registration and retrieval process see {@link AspectRef}.</p>
 */
@Nonnull
public <T> Optional<T> getAspect(@Nonnull AspectRef<T> aspectRef) {
  return getDictionary().getMasterAspectRegistry().getAspect(this, aspectRef);
}
origin: org.opensingular/singular-form-core

/**
 * Find a child by the name ({@link SType#getName()})
 * @param parent the parent instance
 * @param childName the complete name of the child {@link SType#getName()}
 * @return the chield
 */
public static Optional<? extends SInstance> findChildByName(@Nonnull SInstance parent, @Nonnull String childName) {
  if(parent instanceof SIComposite) {
    SType<?> sType = parent.getDictionary().getType(childName);
    return ((SIComposite)parent).findDescendant(sType);
  }
  return Optional.empty();
}
origin: org.opensingular/singular-form-core

/** Checks if the instance is in the same dictionary of scope. If not, throws a exception. */
static final void verifySameDictionary(@Nonnull SScope scope, @Nonnull SInstance instance) {
  if (scope.getDictionary() != instance.getDictionary()) {
    throw new SingularFormException(
        "O dicionário da instância " + instance + " não é o mesmo dicionário do tipo " + scope +
            ". Foram carregados em separado", instance);
  }
}
origin: org.opensingular/singular-form-core

@Override
public final boolean hasAttributeValueDirectly(@Nonnull AtrRef<?, ?, ?> atr) {
  AttrInternalRef ref = getDictionary().getAttributeReferenceOrException(atr);
  return AttributeValuesManager.staticGetAttributeDirectly(attributes, ref) != null;
}
origin: org.opensingular/singular-form-core

private static boolean isType(@Nullable SInstance instance, @Nonnull SType<?> field) {
  return instance != null && instance.getDictionary() == field.getDictionary() && instance.isTypeOf(field);
}
origin: org.opensingular/singular-form-core

@Override
public final <V> V getAttributeValue(@Nonnull String attributeFullName, @Nullable Class<V> resultClass) {
  return getAttributeValue(getDictionary().getAttributeReferenceOrException(attributeFullName), resultClass);
}
origin: org.opensingular/singular-form-core

/** Verifies if the SType of the SInstance is of the informed type. */
@Nonnull
public AssertionsSInstance isTypeOf(@Nonnull Class<? extends SType<?>> expectedType) {
  return isTypeOf(getTarget().getDictionary().getType(expectedType));
}
origin: org.opensingular/singular-form-core

/**
 * Calcula a view mais adequeada para instancia informada. Retorna
 * MView.DEFAULT, se não houver nenhum direcionamento específico e nesse
 * caso então cabe a cada gerador decidir como criar o componente na tela.
 */
public static SView resolve(SInstance instance) {
  return instance.getDictionary().getViewResolver().resolveInternal(instance);
}
origin: org.opensingular/form-core

/**
 * Calcula a view mais adequeada para instancia informada. Retorna
 * MView.DEFAULT, se não houver nenhum direcionamento específico e nesse
 * caso então cabe a cada gerador decidir como criar o componente na tela.
 */
public static SView resolve(SInstance instance) {
  return instance.getDictionary().getViewResolver().resolveInternal(instance);
}
origin: org.opensingular/singular-form-core

@Nullable
@Override
public final <V> V getAttributeValue(@Nonnull AtrRef<?, ?, V> atr) {
  return getAttributeValue(getDictionary().getAttributeReferenceOrException(atr), atr.getValueClass());
}
origin: org.opensingular/singular-form-core

final void setAttributeValueSavingForLatter(@Nonnull String attributeName, @Nullable String value) {
  AttrInternalRef ref = getDictionary().getAttribureRefereceOrCreateLazy(attributeName);
  getAttributesMap().setAttributeValue(ref, null, value);
}
origin: org.opensingular/singular-form-core

/**
 * USO INTERNO: Cria um nova lista de anotações em um novo SDocument, tendo como base as informações de definição
 * do documento informado.
 * Cria uma nova lista de anotações utilizando as configurações de registry do document passado por
 * parâmetro. Essa método tem por objetivo evitar que a nova lista criada fique sem os serviços locais e service
 * registry já configurados na lista original.
 * @param executeInitTypeSetup Se true, dispara as inicializações automáticas implementadas em
 * {@link SInstance#init()}. Usar como false quando a instância está sendo recuperada da persistência. Ver
 * {@link SDocumentFactory#createInstance(RefType, boolean)}.
 */
public static SIList<SIAnnotation> newAnnotationList(@Nonnull SDocument docRef, boolean executeInitTypeSetup) {
  Optional<RefType> rootRefType = docRef.getRootRefType();
  if (rootRefType.isPresent()) {
    RefType refTypeAnnotation = rootRefType.get().createSubReference(STypeAnnotationList.class);
    SDocumentFactory documentFactory;
    RefSDocumentFactory refSDocumentFactory = docRef.getDocumentFactoryRef();
    if (refSDocumentFactory != null) {
      documentFactory = refSDocumentFactory.get();
    } else {
      documentFactory = SDocumentFactory.empty();
    }
    return (SIList<SIAnnotation>) documentFactory.createInstance(refTypeAnnotation, executeInitTypeSetup);
  }
  return (SIList) docRef.getRoot().getDictionary().newInstance(STypeAnnotationList.class);
}
origin: org.opensingular/form-core

/**
 * USO INTERNO: Cria um nova lista de anotações em um novo SDocument, tendo como base as informações de definição
 * do documento informado.
 * Cria uma nova lista de anotações utilizando as configurações de registry do document passado por
 * parâmetro. Essa método tem por objetivo evitar que a nova lista criada fique sem os serviços locais e service
 * registry já configurados na lista original.
 * @param executeInitTypeSetup Se true, dispara as inicializações automáticas implementadas em
 * {@link SInstance#init()}. Usar como false quando a instância está sendo recuperada da persistência. Ver
 * {@link SDocumentFactory#createInstance(RefType, boolean)}.
 */
public static SIList<SIAnnotation> newAnnotationList(@Nonnull SDocument docRef, boolean executeInitTypeSetup) {
  Optional<RefType> rootRefType = docRef.getRootRefType();
  if (rootRefType.isPresent()) {
    RefType refTypeAnnotation = rootRefType.get().createSubReference(STypeAnnotationList.class);
    SDocumentFactory documentFactory;
    RefSDocumentFactory refSDocumentFactory = docRef.getDocumentFactoryRef();
    if (refSDocumentFactory != null) {
      documentFactory = refSDocumentFactory.get();
    } else {
      documentFactory = SDocumentFactory.empty();
    }
    return (SIList<SIAnnotation>) documentFactory.createInstance(refTypeAnnotation, executeInitTypeSetup);
  }
  return docRef.getRoot().getDictionary().newInstance(STypeAnnotationList.class);
}
origin: org.opensingular/singular-form-wicket

SType<?> type = model.getObject().getDictionary().getType(col.getTypeName());
ColumnType columnType = new ColumnType(type.getName(), col.getCustomLabel(), col.getColumnSortName(), col.getDisplayValueFunction());
columnTypes.add(columnType);
origin: org.opensingular/form-core

/**
 * Verifica se a instância informada é do tipo atual, senão dispara exception.
 */
public void checkIfIsInstanceOf(SInstance instance) {
  if (getDictionary() != instance.getDictionary()) {
    throw new SingularFormException("O dicionário da instância " + instance + " não é o mesmo do tipo " + this +
        ". Foram carregados em separado", instance);
  }
  for (SType<?> current = instance.getType(); current != null; current = current.getSuperType()) {
    if (current == this) {
      return;
    }
  }
  throw new SingularFormException(
      "A instância " + instance + " é do tipo " + instance.getType() + ", mas era esperada ser do tipo " +
          this, instance);
}
org.opensingular.formSInstancegetDictionary

Popular methods of SInstance

  • getDocument
    Retorna o documento ao qual pertence a instância atual.
  • getType
  • toStringDisplay
  • getId
    Retorna um ID único dentre as instâncias do mesmo documento. Um ID nunca é reutilizado, mesmo se a i
  • getAttributeValue
  • findNearest
    Returns the nearest SInstance for the given type in the form SInstance tree. The search is performed
  • setId
    Apenas para uso nas soluções de persistencia. Não deve ser usado fora dessa situação.
  • clearInstance
    Apaga os valores associados a instância. Se for uma lista ou composto, apaga os valores em profundid
  • getName
  • getParent
  • getValue
  • isEmptyOfData
    Retorna true se a instancia não conter nenhuma informação diferente de null. A pesquisa é feita em
  • getValue,
  • isEmptyOfData,
  • asAtr,
  • asAtrAnnotation,
  • asAtrProvider,
  • attachEventCollector,
  • detachEventCollector,
  • getField,
  • getPathFromRoot

Popular in Java

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • getSupportFragmentManager (FragmentActivity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now