Package org.openquark.util.xml

Examples of org.openquark.util.xml.NamespaceInfo


     * Attach an attribute declaring the gem namespace: "xmlns:gem=..."
     * Creation date: (Jun 12, 2002 11:22:20 AM)
     * @param element Element the element to which to attach the namespace declaration.
     */
    private static void declareNamespace(Element element) {
        NamespaceInfo namespaceInfo = new NamespaceInfo (BAM_NS, BAM_NS_PREFIX);
       
        XMLPersistenceHelper.attachNamespaceAndSchema(element, namespaceInfo, null, null);
    }
View Full Code Here


   
    /**
     * @return the namespace info for the workspace.
     */
    static NamespaceInfo getNamespaceInfo() {
        return new NamespaceInfo(WorkspacePersistenceConstants.WORKSPACE_NS, WorkspacePersistenceConstants.WORKSPACE_NS_PREFIX);
    }
View Full Code Here

    /**
     * Obtain the namespace info for metadata.
     * @return the metadata xml namespace info.
     */
    static NamespaceInfo getNamespaceInfo() {
        return new NamespaceInfo(MetadataPersistenceConstants.METADATA_NS, MetadataPersistenceConstants.METADATA_NS_PREFIX);
    }
View Full Code Here

        // Convert the metadata into an XML document
        Document document = XMLPersistenceHelper.getEmptyDocument();
        metadata.saveXML(document);
   
        // Attach namespace and schema information to the document element
        NamespaceInfo metadataNSInfo = CALFeatureMetadata.getNamespaceInfo();
        XMLPersistenceHelper.attachNamespaceAndSchema(document, metadataNSInfo, MetadataPersistenceConstants.METADATA_SCHEMA_LOCATION, MetadataPersistenceConstants.METADATA_NS);

        // Write the document to the metadata file
        BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(metadataOutputStream);
        XMLPersistenceHelper.documentToXML(document, bufferedOutputStream, false);
View Full Code Here

    /**
     * Obtain the XML namespace info for gems.
     * @return gem XML namespace info..
     */
    public static NamespaceInfo getNamespaceInfo() {
        return new NamespaceInfo(GemPersistenceConstants.GEM_NS, GemPersistenceConstants.GEM_NS_PREFIX);
    }
View Full Code Here

        // Create the GemCutter element, with the appropriate default namespace
        Element resultElement = document.createElementNS(GemPersistenceConstants.GEMS_NS, GemPersistenceConstants.GEMCUTTER_TAG);
        parentNode.appendChild(resultElement);

        // Declare gem namespace and schema.
        NamespaceInfo gemNSInfo = Gem.getNamespaceInfo();
        XMLPersistenceHelper.attachNamespaceAndSchema(document, gemNSInfo, GemPersistenceConstants.GEMS_SCHEMA_LOCATION, GemPersistenceConstants.GEMS_NS);

        // Add info for the tabletop
        gemCutter.getTableTop().saveXML(resultElement);
View Full Code Here

TOP

Related Classes of org.openquark.util.xml.NamespaceInfo

Copyright © 2018 www.massapicom. 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.