Examples of XmiElement


Examples of org.modeshape.sequencer.teiid.xmi.XmiElement

        // strip off the prefix if necessary
        uuid = this.writer.getResolver().resolveInternalReference(uuid);

        // go get the tag XMI element
        final XmiElement referencedElement = this.writer.getResolver().getUuidMappings().get(uuid);

        // make need to make sure referenced element is the for model types tag so follow the annotated object reference
        if ((referencedElement != null) && CoreLexicon.ModelId.TAGS.equals(referencedElement.getName())) {
            if (ModelId.MODEL_TYPES.equals(referencedElement.getAttributeValue(CoreLexicon.ModelId.KEY, URI))) {
                // get med node by using parent's annotated object
                String medUuid = referencedElement.getParent().getAttributeValue(CoreLexicon.ModelId.ANNOTATED_OBJECT, URI);
                medUuid = this.writer.getResolver().resolveInternalReference(medUuid);
                final Node medNode = this.writer.getResolver().getNode(medUuid);

                if (medNode != null) {
                    final Value newValue = this.writer.getContext().valueFactory().createValue(newModelType);
View Full Code Here

Examples of org.modeshape.sequencer.teiid.xmi.XmiElement

        // strip off the prefix if necessary
        uuid = this.writer.getResolver().resolveInternalReference(uuid);

        // go get the tag XMI element
        final XmiElement referencedElement = this.writer.getResolver().getUuidMappings().get(uuid);

        // make sure referenced element is the for description tag
        if ((referencedElement != null) && CoreLexicon.ModelId.TAGS.equals(referencedElement.getName())) {
            if (ModelId.DESCRIPTION.equals(referencedElement.getAttributeValue(CoreLexicon.ModelId.KEY, URI))) {
                // get property definition node by using parent's annotated object
                String propDefUuid = referencedElement.getParent().getAttributeValue(CoreLexicon.ModelId.ANNOTATED_OBJECT, URI);
                propDefUuid = this.writer.getResolver().resolveInternalReference(propDefUuid);
                final Node propDefNode = this.writer.getResolver().getNode(propDefUuid);

                if (propDefNode != null) {
                    final Node descriptionNode = getHandler().addNode(propDefNode,
View Full Code Here

Examples of org.modeshape.sequencer.teiid.xmi.XmiElement

        // strip off the prefix if necessary
        uuid = this.writer.getResolver().resolveInternalReference(uuid);

        // go get the tag XMI element
        final XmiElement referencedElement = this.writer.getResolver().getUuidMappings().get(uuid);

        // make sure referenced element is the for the display name tag
        if ((referencedElement != null) && CoreLexicon.ModelId.TAGS.equals(referencedElement.getName())) {
            if (ModelId.Property.DISPLAY_NAME.equals(referencedElement.getAttributeValue(CoreLexicon.ModelId.KEY, URI))) {
                // get property definition node by using parent's annotated object
                String propDefUuid = referencedElement.getParent().getAttributeValue(CoreLexicon.ModelId.ANNOTATED_OBJECT, URI);
                propDefUuid = this.writer.getResolver().resolveInternalReference(propDefUuid);
                final Node propDefNode = this.writer.getResolver().getNode(propDefUuid);

                if (propDefNode != null) {
                    final Node displayNameNode = getHandler().addNode(propDefNode,
View Full Code Here

Examples of org.modeshape.sequencer.teiid.xmi.XmiElement

    /**
     * @return the model description or <code>null</code> if not found
     */
    public String getDescription() {
        final XmiElement modelAnnotation = getModelAnnotation();

        if (modelAnnotation == null) {
            return null;
        }

        return modelAnnotation.getAttributeValue(CoreLexicon.ModelId.DESCRIPTION, CoreLexicon.Namespace.URI);
    }
View Full Code Here

Examples of org.modeshape.sequencer.teiid.xmi.XmiElement

    /**
     * @return the max set size or <code>100</code> if not found
     */
    public long getMaxSetSize() {
        final XmiElement modelAnnotation = getModelAnnotation();

        if (modelAnnotation == null) {
            return DEFAULT_MAX_SET_SIZE;
        }

        final String maxSetSize = modelAnnotation.getAttributeValue(CoreLexicon.ModelId.MAX_SET_SIZE,
                                                                    CoreLexicon.Namespace.URI);

        if (StringUtil.isBlank(maxSetSize)) {
            return DEFAULT_MAX_SET_SIZE;
        }
View Full Code Here

Examples of org.modeshape.sequencer.teiid.xmi.XmiElement

    /**
     * @return the model imports XMI elements or <code>null</code> if none found
     */
    public List<XmiElement> getModelImports() {
        final XmiElement modelAnnotation = getModelAnnotation();

        if (modelAnnotation == null) {
            return null;
        }

        final List<XmiElement> imports = new ArrayList<XmiElement>();

        for (final XmiElement kid : modelAnnotation.getChildren()) {
            if (CoreLexicon.ModelId.MODEL_IMPORT.equals(kid.getName()) && CoreLexicon.Namespace.URI.equals(
                    kid.getNamespaceUri())) {
                imports.add(kid);
            }
        }
View Full Code Here

Examples of org.modeshape.sequencer.teiid.xmi.XmiElement

    /**
     * @return the model type or <code>null</code> if not found
     */
    public String getModelType() {
        final XmiElement modelAnnotation = getModelAnnotation();

        if (modelAnnotation == null) {
            return null;
        }

        return modelAnnotation.getAttributeValue(CoreLexicon.ModelId.MODEL_TYPE, CoreLexicon.Namespace.URI);
    }
View Full Code Here

Examples of org.modeshape.sequencer.teiid.xmi.XmiElement

    /**
     * @return the model name in source or <code>null</code> if not found
     */
    public String getNameInSource() {
        final XmiElement modelAnnotation = getModelAnnotation();

        if (modelAnnotation == null) {
            return null;
        }

        return modelAnnotation.getAttributeValue(CoreLexicon.ModelId.NAME_IN_SOURCE, CoreLexicon.Namespace.URI);
    }
View Full Code Here

Examples of org.modeshape.sequencer.teiid.xmi.XmiElement

    /**
     * @return the primary metamodel URI or <code>null</code> if not found
     */
    public String getPrimaryMetamodelUri() {
        final XmiElement modelAnnotation = getModelAnnotation();

        if (modelAnnotation == null) {
            return null;
        }

        return modelAnnotation.getAttributeValue(CoreLexicon.ModelId.PRIMARY_METAMODEL_URI, CoreLexicon.Namespace.URI);
    }
View Full Code Here

Examples of org.modeshape.sequencer.teiid.xmi.XmiElement

    /**
     * @return the producer name or <code>null</code> if not found
     */
    public String getProducerName() {
        final XmiElement modelAnnotation = getModelAnnotation();

        if (modelAnnotation == null) {
            return null;
        }

        return modelAnnotation.getAttributeValue(CoreLexicon.ModelId.PRODUCER_NAME, CoreLexicon.Namespace.URI);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.