com.hp.hpl.deli
Class Vocabulary

java.lang.Object
  extended bycom.hp.hpl.deli.Vocabulary
All Implemented Interfaces:
java.io.Serializable

class Vocabulary
extends java.lang.Object
implements java.io.Serializable

This class processes the CC/PP vocabulary definition file.

Author:
Mark H. Butler (mark-h_butler@hp.com)

Field Summary
private  java.util.HashMap attributeProperties
           
protected  java.util.HashMap datatypesLookup
           
protected  java.util.HashMap namespaceLookup
           
private static long serialVersionUID
          Comment for serialVersionUID
 com.hp.hpl.jena.datatypes.TypeMapper tm
           
 
Constructor Summary
protected Vocabulary(java.lang.String configFile)
          The constructor reads in a vocabulary definition file and then processess the set of vocabularies it references.
 
Method Summary
protected  void addAttributeToVocabulary(java.lang.String qualifiedAttribute, java.lang.String currentComponent, java.lang.String collectionType)
          This method allows the processor to add a new attribute to the vocabulary, when it encounters attributes that are not defined in the vocabulary definition.
protected  java.util.Vector getAttPropertiesWithAttName(com.hp.hpl.jena.rdf.model.Resource qualifiedAttributeName)
           
protected  java.util.Vector getAttPropertiesWithAttName(java.lang.String name)
          This method returns a Vector of HashMaps representing the properties of Vocabulary Attributes with a given Attribute Name.
protected  java.util.HashMap getAttribute(com.hp.hpl.jena.rdf.model.Resource attributeQName)
           
protected  com.hp.hpl.jena.rdf.model.Resource getAttributeProperty(com.hp.hpl.jena.rdf.model.Resource attributeQName, java.lang.String paramName)
          This method returns a given value for an attribute property where the attribute is specified by the attribute qname and its component qname.
protected  java.lang.String getRealNamespace(java.lang.String alias)
          Get the actual namespace from a given alias.
private  com.hp.hpl.jena.rdf.model.Resource getRealQName(com.hp.hpl.jena.rdf.model.Resource theUri)
           
 boolean usesRDFDatatyping(java.lang.String prfUri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Comment for serialVersionUID

See Also:
Constant Field Values

namespaceLookup

protected java.util.HashMap namespaceLookup

attributeProperties

private java.util.HashMap attributeProperties

tm

public com.hp.hpl.jena.datatypes.TypeMapper tm

datatypesLookup

protected java.util.HashMap datatypesLookup
Constructor Detail

Vocabulary

protected Vocabulary(java.lang.String configFile)
              throws javax.xml.parsers.ParserConfigurationException
The constructor reads in a vocabulary definition file and then processess the set of vocabularies it references.

Parameters:
configFile - The filename of the vocabulary / namespace configuration file.
Method Detail

getAttributeProperty

protected com.hp.hpl.jena.rdf.model.Resource getAttributeProperty(com.hp.hpl.jena.rdf.model.Resource attributeQName,
                                                                  java.lang.String paramName)
This method returns a given value for an attribute property where the attribute is specified by the attribute qname and its component qname.

Parameters:
attributeQName - The QName of the attribute.
paramName - The required Parameter (eg "ccppType").

usesRDFDatatyping

public boolean usesRDFDatatyping(java.lang.String prfUri)

getRealQName

private com.hp.hpl.jena.rdf.model.Resource getRealQName(com.hp.hpl.jena.rdf.model.Resource theUri)

getAttPropertiesWithAttName

protected java.util.Vector getAttPropertiesWithAttName(java.lang.String name)
This method returns a Vector of HashMaps representing the properties of Vocabulary Attributes with a given Attribute Name. The attribute name can either be qualified (in which case it will contain a hash character) or unqualified.

Parameters:
name - The attribute name as a string (eg 'ColorCapable').

getAttPropertiesWithAttName

protected java.util.Vector getAttPropertiesWithAttName(com.hp.hpl.jena.rdf.model.Resource qualifiedAttributeName)

getAttribute

protected java.util.HashMap getAttribute(com.hp.hpl.jena.rdf.model.Resource attributeQName)

addAttributeToVocabulary

protected void addAttributeToVocabulary(java.lang.String qualifiedAttribute,
                                        java.lang.String currentComponent,
                                        java.lang.String collectionType)
This method allows the processor to add a new attribute to the vocabulary, when it encounters attributes that are not defined in the vocabulary definition.

Parameters:
qualifiedAttribute -
currentComponent - The qualified name of the component, if known.
collectionType - The collection type, if known.

getRealNamespace

protected java.lang.String getRealNamespace(java.lang.String alias)
Get the actual namespace from a given alias.

Parameters:
alias - the aliased namespace
Returns:
The _actual_ namespace being used for the vocabulary.