Examples of ExtensibleElement

Because it is impossible to cover all of the HTML/JSON/Text output cases for ExtensibleElements, DDMSence will simply print out the existence of extensible elements at the Resource level:

Details about the XOM Element class can be found at: http://www.xom.nu/apidocs/index.html?nu/xom/Element.html

{@table.header History}

In DDMS 2.0, only one element is allowed on the resource. In DDMS 3.0 - 4.1, zero to many may appear. The ExtensibleElement extension point was removed in DDMS 5.0.

{@table.footer}{@table.header Nested Elements}{@child.info any:<extensibleElements>|0..1|10000}{@child.info any:<extensibleElements>|0..*|01110}{@table.footer}{@table.header Attributes}None. {@table.footer}{@table.header Validation Rules}{@ddms.rule An extensible element must not be in the DDMS namespace.|Error|11111}{@table.footer} @author Brian Uri! @since 1.1.0
  • org.apache.abdera.model.ExtensibleElement
    An abstract element that can be extended with namespaced child elements
  • org.eclipse.bpel.model.ExtensibleElement
    A representation of the model object 'Extensible Element'.

    The following features are supported:

    @see org.eclipse.bpel.model.BPELPackage#getExtensibleElement() @model @generated

  • Examples of org.apache.abdera.model.ExtensibleElement

        l.setRel("asset");
        e.addLink(l);
    }*/

            //generate meta data
            ExtensibleElement extension = e.addExtension(METADATA);
            ExtensibleElement childExtension = extension.addExtension(ARCHIVED);
            //childExtension.setAttributeValue("type", ArtifactsRepository.METADATA_TYPE_STRING);
            childExtension.addSimpleExtension(VALUE, a.isArchived() ? "true" : "false");

            childExtension = extension.addExtension(UUID);
            childExtension.addSimpleExtension(VALUE, a.getUUID());

            childExtension = extension.addExtension(STATE);
            childExtension.addSimpleExtension(VALUE, a.getState() == null ? "" : a.getState().getName());

            childExtension = extension.addExtension(FORMAT);
            childExtension.addSimpleExtension(VALUE, a.getFormat());

            List<CategoryItem> categories = a.getCategories();
            childExtension = extension.addExtension(CATEGORIES);
            for (CategoryItem c : categories) {
                childExtension.addSimpleExtension(VALUE, c.getName());
            }

            org.apache.abdera.model.Content content = factory.newContent();
            content.setSrc(base.clone().path("binary").build().toString());
            content.setMimeType("application/octet-stream");
    View Full Code Here

    Examples of org.apache.abdera.model.ExtensibleElement

                l.setRel("asset");
                e.addLink(l);
            }

            //generate meta data
            ExtensibleElement extension = e.addExtension(METADATA);
            ExtensibleElement childExtension = extension.addExtension(ARCHIVED);
            //childExtension.setAttributeValue("type", ArtifactsRepository.METADATA_TYPE_STRING);
            childExtension.addSimpleExtension(VALUE, p.isArchived() ? "true" : "false");

            childExtension = extension.addExtension(UUID);
            childExtension.addSimpleExtension(VALUE, p.getUUID());

            childExtension = extension.addExtension(STATE);
            childExtension.addSimpleExtension(VALUE, p.getState() == null ? "" : p.getState().getName());

            org.apache.abdera.model.Content content = factory.newContent();
            content.setSrc(UriBuilder.fromUri(baseURL).path("binary").build().toString());
            content.setMimeType("application/octet-stream");
            content.setContentType(Type.MEDIA);
    View Full Code Here

    Examples of org.apache.abdera.model.ExtensibleElement

        l.setRel("asset");
        e.addLink(l);
    }*/

            //generate meta data
            ExtensibleElement extension = e.addExtension(METADATA);
            ExtensibleElement childExtension = extension.addExtension(ARCHIVED);
            //childExtension.setAttributeValue("type", ArtifactsRepository.METADATA_TYPE_STRING);
            childExtension.addSimpleExtension(VALUE, a.isArchived() ? "true" : "false");

            childExtension = extension.addExtension(UUID);
            childExtension.addSimpleExtension(VALUE, a.getUUID());

            childExtension = extension.addExtension(STATE);
            childExtension.addSimpleExtension(VALUE, a.getState() == null ? "" : a.getState().getName());

            childExtension = extension.addExtension(FORMAT);
            childExtension.addSimpleExtension(VALUE, a.getFormat());

            List<CategoryItem> categories = a.getCategories();
            childExtension = extension.addExtension(CATEGORIES);
            for (CategoryItem c : categories) {
                childExtension.addSimpleExtension(VALUE, c.getName());
            }

            org.apache.abdera.model.Content content = factory.newContent();
            content.setSrc(UriBuilder.fromUri(baseURL).path("binary").build().toString());
            content.setMimeType("application/octet-stream");
    View Full Code Here

    Examples of org.apache.abdera.model.ExtensibleElement

                }
                // TODO: support LastContributor
                if (entry.getAuthor() != null) {
                }

                ExtensibleElement metadataExtension = entry
                        .getExtension(Translator.METADATA);
                if (metadataExtension != null) {
                    ExtensibleElement archivedExtension = metadataExtension
                            .getExtension(Translator.ARCHIVED);
                    if (archivedExtension != null) {
                        p.archiveItem(Boolean.getBoolean(archivedExtension
                                .getSimpleExtension(Translator.VALUE)));
                    }

                    // TODO: Package state is not fully supported yet
                    /*
     
    View Full Code Here

    Examples of org.apache.abdera.model.ExtensibleElement

        @Produces(MediaType.APPLICATION_ATOM_XML)
        public Entry createAssetFromAtom(@PathParam("packageName") String packageName, Entry entry) {
            try {
                String format = null;
                String initialCategory = null;
                ExtensibleElement metadataExtension = entry.getExtension(Translator.METADATA);
                if (metadataExtension != null) {
                    ExtensibleElement formatExtension = metadataExtension.getExtension(Translator.FORMAT);
                    format = formatExtension != null ? formatExtension.getSimpleExtension(Translator.VALUE) : null;
                    ExtensibleElement categoryExtension = metadataExtension.getExtension(Translator.CATEGORIES);
                    initialCategory = formatExtension != null ? categoryExtension.getSimpleExtension(Translator.VALUE) : null;
                }

                AssetItem ai = rulesRepository.loadModule(packageName).addAsset(entry.getTitle(), entry.getSummary(), initialCategory, format);
               
                //The categories are not saved by addAsset(). Need to force it here.
    View Full Code Here

    Examples of org.apache.abdera.model.ExtensibleElement

        public void updateAssetFromAtom(@PathParam("packageName") String packageName, @PathParam("assetName") String assetName, Entry assetEntry) {
            try {
                String format = null;
                String[] categories = null;
                String state = null;
                ExtensibleElement metadataExtension = assetEntry.getExtension(Translator.METADATA);
                if (metadataExtension != null) {
                    ExtensibleElement formatExtension = metadataExtension.getExtension(Translator.FORMAT);
                    format = formatExtension != null ? formatExtension.getSimpleExtension(Translator.VALUE) : null;
                    ExtensibleElement categoryExtension = metadataExtension.getExtension(Translator.CATEGORIES);
                    if (categoryExtension != null) {
                        List<Element> categoryValues = categoryExtension
                                .getExtensions(Translator.VALUE);
                        categories = new String[categoryValues.size()];
                        for (int i=0; i< categoryValues.size(); i++) {
                            String catgoryValue = categoryValues.get(i).getText();
                            categories[i] = catgoryValue;
                        }
                    }
                    ExtensibleElement stateExtension = metadataExtension.getExtension(Translator.STATE);
                    state = stateExtension != null ? stateExtension.getSimpleExtension(Translator.VALUE) : null;
                }

                //Throws RulesRepositoryException if the package or asset does not exist
                AssetItem ai = rulesRepository.loadModule(packageName).loadAsset(assetName);
                //Update asset
    View Full Code Here

    Examples of org.apache.abdera.model.ExtensibleElement

        @Consumes(MediaType.APPLICATION_ATOM_XML)
        @Produces(MediaType.APPLICATION_ATOM_XML)
        public Entry createPackageFromAtom(Entry entry) {
            try {
                String checkinComment = "Initial";
                ExtensibleElement metadataExtension = entry.getExtension(Translator.METADATA);
                if (metadataExtension != null) {
                    ExtensibleElement checkinCommentExtension = metadataExtension.getExtension(Translator.CHECKIN_COMMENT);
                    if (checkinCommentExtension != null) {
                        checkinComment =  checkinCommentExtension.getSimpleExtension(Translator.VALUE);
                    }
                }
                ModuleItem packageItem = rulesRepository.createModule(entry.getTitle(), entry.getSummary(), ModuleItem.MODULE_FORMAT, null, checkinComment);
                return toPackageEntryAbdera(packageItem, uriInfo);
            } catch (RuntimeException e) {
    View Full Code Here

    Examples of org.apache.abdera.model.ExtensibleElement

                // TODO: support LastContributor
                if (entry.getAuthor() != null) {
                }

                String checkinComment = "";
                ExtensibleElement metadataExtension = entry.getExtension(Translator.METADATA);
                if (metadataExtension != null) {
                    ExtensibleElement archivedExtension = metadataExtension.getExtension(Translator.ARCHIVED);
                    if (archivedExtension != null) {
                        existingModuleItem.archiveItem(Boolean.getBoolean(archivedExtension.getSimpleExtension(Translator.VALUE)));
                    }

                    ExtensibleElement checkinCommentExtension = metadataExtension.getExtension(Translator.CHECKIN_COMMENT);
                    if (checkinCommentExtension != null) {
                        checkinComment =  checkinCommentExtension.getSimpleExtension(Translator.VALUE);
                    }
                   
                    // TODO: Package state is not fully supported yet
                    /*
                     * ExtensibleElement stateExtension =
    View Full Code Here

    Examples of org.apache.abdera.model.ExtensibleElement

        @Produces(MediaType.APPLICATION_ATOM_XML)
        public Entry createAssetFromAtom(@PathParam("packageName") String packageName, Entry entry) {
            try {
                String format = null;
                String[] categories = null;
                ExtensibleElement metadataExtension = entry.getExtension(Translator.METADATA);
                if (metadataExtension != null) {
                    ExtensibleElement formatExtension = metadataExtension.getExtension(Translator.FORMAT);
                    format = formatExtension != null ? formatExtension.getSimpleExtension(Translator.VALUE) : null;
                   
                    ExtensibleElement categoryExtension = metadataExtension.getExtension(Translator.CATEGORIES);
                    if (categoryExtension != null) {
                        List<Element> categoryValues = categoryExtension
                                .getExtensions(Translator.VALUE);
                        categories = new String[categoryValues.size()];
                        for (int i=0; i< categoryValues.size(); i++) {
                            String catgoryValue = categoryValues.get(i).getText();
                            categories[i] = catgoryValue;
    View Full Code Here

    Examples of org.apache.abdera.model.ExtensibleElement

        public void updateAssetFromAtom(@PathParam("packageName") String packageName, @PathParam("assetName") String assetName, Entry assetEntry) {
            try {
                String format = null;
                String[] categories = null;
                String state = null;
                ExtensibleElement metadataExtension = assetEntry.getExtension(Translator.METADATA);
                if (metadataExtension != null) {
                    ExtensibleElement formatExtension = metadataExtension.getExtension(Translator.FORMAT);
                    format = formatExtension != null ? formatExtension.getSimpleExtension(Translator.VALUE) : null;
                    ExtensibleElement categoryExtension = metadataExtension.getExtension(Translator.CATEGORIES);
                    if (categoryExtension != null) {
                        List<Element> categoryValues = categoryExtension
                                .getExtensions(Translator.VALUE);
                        categories = new String[categoryValues.size()];
                        for (int i=0; i< categoryValues.size(); i++) {
                            String catgoryValue = categoryValues.get(i).getText();
                            categories[i] = catgoryValue;
                        }
                    }
                    ExtensibleElement stateExtension = metadataExtension.getExtension(Translator.STATE);
                    state = stateExtension != null ? stateExtension.getSimpleExtension(Translator.VALUE) : null;
                }

                //Throws RulesRepositoryException if the package or asset does not exist
                AssetItem ai = rulesRepository.loadModule(packageName).loadAsset(assetName);
                //Update asset
    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.