org.mindswap.damlparser
Class DAMLParser

java.lang.Object
  |
  +--org.mindswap.xmlparser.XMLParser
        |
        +--org.mindswap.rdfparser.RDFParser
              |
              +--org.mindswap.damlparser.DAMLParser
All Implemented Interfaces:
DAMLConsts, OWLConsts, RDFConsts, XMLConsts
Direct Known Subclasses:
OWLParser

public class DAMLParser
extends RDFParser


Fields inherited from interface org.mindswap.rdfparser.consts.RDFConsts
OLD_DAMLURL, RDF, RDF_About, RDF_AboutEach, RDF_AboutEachPrefix, RDF_Alt, RDF_Bag, RDF_BagID, RDF_Class, RDF_Comment, RDF_ConstraintProperty, RDF_Description, RDF_Domain, RDF_First, RDF_ID, RDF_IsDefinedBy, RDF_Label, RDF_Li, RDF_Nil, RDF_NodeID, RDF_Object, RDF_ParseType, RDF_Predicate, RDF_Property, RDF_Range, RDF_Resource, RDF_Rest, RDF_SeeAlso, RDF_Seq, RDF_SubClass, RDF_Subject, RDF_SubProperty, RDF_TERMS, RDF_Type, RDF_Value, RDFSURL, RDFURL
 
Fields inherited from interface org.mindswap.damlparser.consts.DAMLConsts
DAML_Cardinality, DAML_CardinalityQ, DAML_Class, DAML_Collection, DAML_Comment, DAML_ComplementOf, DAML_DatatypeProperty, DAML_DifferentIndividualFrom, DAML_DisjointUnionOf, DAML_DisjointWith, DAML_Domain, DAML_EquivalentTo, DAML_First, DAML_HasClass, DAML_HasClassQ, DAML_HasValue, DAML_Imports, DAML_IntersectionOf, DAML_InverseOf, DAML_IsDefinedBy, DAML_Item, DAML_Label, DAML_List, DAML_MaxCardinality, DAML_MaxCardinalityQ, DAML_MinCardinality, DAML_MinCardinalityQ, DAML_Nil, DAML_ObjectProperty, DAML_OneOf, DAML_OnProperty, DAML_Ontology, DAML_Property, DAML_Range, DAML_Resource, DAML_Rest, DAML_Restriction, DAML_SameClassAs, DAML_SameIndividualAs, DAML_SamePropertyAs, DAML_SeeAlso, DAML_SubClassOf, DAML_SubPropertyOf, DAML_TERMS, DAML_Thing, DAML_ToClass, DAML_TransitiveProperty, DAML_Type, DAML_UnambiguousProperty, DAML_UnionOf, DAML_UniqueProperty, DAML_VersionInfo, DAMLURL, INFINITE_CARDINALITY
 
Fields inherited from interface org.mindswap.owlparser.consts.OWLConsts
OWL_AllValuesFrom, OWL_Cardinality, OWL_Class, OWL_ComplementOf, OWL_DatatypeProperty, OWL_DifferentIndividualFrom, OWL_DisjointUnionOf, OWL_DisjointWith, OWL_FunctionalProperty, OWL_HasValue, OWL_Imports, OWL_IntersectionOf, OWL_InverseFunctionalProperty, OWL_InverseOf, OWL_LITE_TERMS, OWL_MaxCardinality, OWL_MinCardinality, OWL_ObjectProperty, OWL_OneOf, OWL_OnProperty, OWL_Ontology, OWL_Restriction, OWL_SameAs, OWL_SameClassAs, OWL_SameIndividualAs, OWL_SamePropertyAs, OWL_SomeValuesFrom, OWL_SymmetricProperty, OWL_TERMS, OWL_TransitiveProperty, OWL_UnionOf, OWL_VersionInfo, OWLURL
 
Fields inherited from interface org.mindswap.xmlparser.consts.XMLConsts
TARGET_NAMESPACE, XML_BASE, XML_Binary, XML_Boolean, XML_Byte, XML_CDATA, XML_COMPLEXTYPE, XML_Date, XML_Decimal, XML_Doctype, XML_Double, XML_ELEMENT, XML_Entity, XML_ENUMERATION, XML_Float, XML_IMPORT, XML_Int, XML_Integer, XML_Long, XML_MAXOCCURS, XML_MINOCCURS, XML_NAME, XML_NAMESPACE, XML_NegativeInteger, XML_NILLABLE, XML_NonNegativeInteger, XML_NonPositiveInteger, XML_PositiveInteger, XML_REF, XML_RESTRICTION, XML_SCHEMA, XML_SEQUENCE, XML_Short, XML_SIMPLETYPE, XML_String, XML_Time, XML_TimeDuration, XML_TYPE, XML_UnsignedByte, XML_UnsignedInt, XML_UnsignedLong, XML_UnsignedShort, XML_UriReference, XML_VALUE, XMLURL
 
Constructor Summary
DAMLParser()
           
 
Method Summary
 RDFFile read(java.lang.String fn, java.lang.String abbrev)
          The core function of the parser.
 DAMLFile readDAML(java.lang.String fn, java.lang.String abbrev)
          The core function of the parser.
 
Methods inherited from class org.mindswap.rdfparser.RDFParser
createFromTriples, readRDF, recursiveRead, revalidate
 
Methods inherited from class org.mindswap.xmlparser.XMLParser
read
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DAMLParser

public DAMLParser()
Method Detail

read

public RDFFile read(java.lang.String fn,
                    java.lang.String abbrev)
             throws java.io.FileNotFoundException,
                    java.io.IOException,
                    XMLParserException
The core function of the parser. Takes as input the filename to parse and the abbreviation to use for the parsed file in the namespaces section. Returns an DAMLFile which is the parsed representation of the file.

Overrides:
read in class RDFParser
Parameters:
fn - The filename from which to load the DAML and parse.
abbrev - The abbreviation to be associated with this file in the namespace declaration.
Returns:
The parsed object model (DAMLFile) that represents the DAML file, or null if loading DAML spec.
Throws:
java.io.FileNotFoundException - If the provided url does not exist.
java.io.IOException - Thrown if there is some error during the reading of the file.
XMLParserException - Thrown when there is an error during parsing due to invalid formatting or other syntactical errors present in the file.

readDAML

public DAMLFile readDAML(java.lang.String fn,
                         java.lang.String abbrev)
                  throws java.io.FileNotFoundException,
                         java.io.IOException,
                         XMLParserException
The core function of the parser. Takes as input the filename to parse and the abbreviation to use for the parsed file in the namespaces section. Returns an DAMLFile which is the parsed representation of the file.

Parameters:
fn - The filename from which to load the DAML and parse.
abbrev - The abbreviation to be associated with this file in the namespace declaration.
Returns:
The parsed object model (DAMLFile) that represents the DAML file, or null if loading DAML spec.
Throws:
java.io.FileNotFoundException - If the provided url does not exist.
java.io.IOException - Thrown if there is some error during the reading of the file.
XMLParserException - Thrown when there is an error during parsing due to invalid formatting or other syntactical errors present in the file.