Package org.semanticweb.owl.util

Examples of org.semanticweb.owl.util.NamespaceUtil


        }
        else{
            defaultNamespace = ontURIStr + "#";
        }

        nsUtil = new NamespaceUtil();
        defaultPrefix = nsUtil.getPrefix(defaultNamespace);

        writeHeader(ontology, writer);
        writeStanzas(ontology, writer);
View Full Code Here


        namespaceMap = new HashMap<String, String>();
        namespaceMap.put("rdf", Namespaces.RDF.toString());
        namespaceMap.put("rdfs", Namespaces.RDFS.toString());
        namespaceMap.put("owl", Namespaces.OWL.toString());
        namespaceMap.put("dc", DublinCoreVocabulary.NAME_SPACE.toString());
        NamespaceUtil u = new NamespaceUtil();

        for (XSDVocabulary v : XSDVocabulary.values()) {
            dataTypeNames.add(v.getURI().getFragment());
            dataTypeNames.add("xsd:" + v.getURI().getFragment());
        }
        dataTypeNames.add(OWLRDFVocabulary.RDF_XML_LITERAL.getURI().getFragment());
        dataTypeNames.add("rdf:" + OWLRDFVocabulary.RDF_XML_LITERAL.getURI().getFragment());

        dataTypeNames.add(dataFactory.getTopDataType().getURI().getFragment());

        for (URI uri : OWLRDFVocabulary.BUILT_IN_ANNOTATION_PROPERTIES) {
            String[] res = u.split(uri.toString(), null);
            annotationURIs.add(u.getPrefix(res[0]) + ":" + res[1]);
        }
        for(DublinCoreVocabulary v : DublinCoreVocabulary.values()) {
            annotationURIs.add(v.getQName());
        }
View Full Code Here

    public OWLOntologyNamespaceManager(OWLOntologyManager man, OWLOntology ontology, OWLOntologyFormat format) {
        super(getDefaultNamespace(ontology));
        this.man = man;
        this.ontology = ontology;
        namespaceUtil = new NamespaceUtil();
        ontologyFormat = format;
        processOntology();
    }
View Full Code Here

        return ontology;
    }


    private void processOntology() {
        namespaceUtil = new NamespaceUtil();
        if (ontologyFormat instanceof NamespaceOWLOntologyFormat) {
            NamespaceOWLOntologyFormat namespaceFormat = (NamespaceOWLOntologyFormat) ontologyFormat;
            Map<String, String> namespacesByPrefix = namespaceFormat.getNamespacesByPrefixMap();
            for (String prefix : namespacesByPrefix.keySet()) {
                if (prefix.length() > 0) {
View Full Code Here

TOP

Related Classes of org.semanticweb.owl.util.NamespaceUtil

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.