public class Profile extends Object implements Serializable, Cloneable, Comparable, Documentable
| Modifier and Type | Field and Description |
|---|---|
protected Map |
elements
My elements.
|
protected ProfileAttributes |
profAttr
My profile attributes.
|
static String |
PROFILES_DTD_FPI
The formal public identifier of the profiles DTD.
|
static String |
PROFILES_DTD_URL
The system identifier of the profiles DTD.
|
protected ResourceAttributes |
resAttr
My resource attributes.
|
| Constructor and Description |
|---|
Profile()
Create a blank profile.
|
Profile(Node root)
Creates a new
Profile instance. |
Profile(Node root,
ObjectFactory factory)
Create a profile from an XML document.
|
Profile(ProfileAttributes profAttr,
ResourceAttributes resAttr)
Create a profile from its attributes.
|
Profile(String string)
Create a profile from an XML document.
|
Profile(String string,
ObjectFactory factory)
Create a profile from an XML document.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToModel(com.hp.hpl.jena.rdf.model.Model model)
Add this profile as an RDF resource description to an RDF model.
|
Object |
clone() |
int |
compareTo(Object rhs) |
static Document |
createProfileDocument()
Create a <profile> document using the profiles DTD.
|
static List |
createProfiles(Element root)
Create a list of profiles by deserializing data from the given XML element.
|
static List |
createProfiles(Element root,
ObjectFactory factory)
Create a list of profiles by deserializing data from the given XML element.
|
static Document |
createProfilesDocument()
Create a <profiles> document using the profiles DTD.
|
boolean |
equals(Object rhs) |
ProfileAttributes |
getProfileAttributes()
Get the profile attributes.
|
Map |
getProfileElements()
Get the profile elements.
|
ResourceAttributes |
getResourceAttributes()
Get the resource attributes.
|
URI |
getURI() |
int |
hashCode() |
static void |
main(String[] argv)
Try to parse an XML profile in a file in its XML vocabulary.
|
void |
setProfileAttributes(ProfileAttributes profAttr)
Set this profile's profile attributes.
|
void |
setResourceAttributes(ResourceAttributes resAttr)
Set this profile's resource attributes.
|
String |
toString() |
Node |
toXML(Document doc)
Serialize this profile as an XML node.
|
Node |
toXMLWithoutElements(Document doc)
Serialize this profile as an XML node but without any elements.
|
public static final String PROFILES_DTD_FPI
public static String PROFILES_DTD_URL
protected ProfileAttributes profAttr
protected ResourceAttributes resAttr
protected Map elements
String) to ProfileElement.public Profile()
public Profile(String string) throws SAXException
string - The XML document (as a string).SAXException - If the string can't be parsed.public Profile(String string, ObjectFactory factory) throws SAXException
string - The XML document (as a string).factory - Object factory to use.SAXException - If the string can't be parsed.public Profile(Node root)
Profile instance.root - a Node value.public Profile(Node root, ObjectFactory factory)
root - The <profile> element.public Profile(ProfileAttributes profAttr, ResourceAttributes resAttr)
profAttr - Profile attributes.resAttr - Resource attributes.public static List createProfiles(Element root, ObjectFactory factory)
root - Either a <profiles> or a <profile> element.factory - Factory for creation of profile-related objects.public static List createProfiles(Element root)
Profile, ProfileAttributes, ResourceAttributes,
and ProfileElement and its subclasses.root - Either a <profiles> or a <profile> element.public int compareTo(Object rhs)
compareTo in interface Comparablepublic ProfileAttributes getProfileAttributes()
public ResourceAttributes getResourceAttributes()
public void setProfileAttributes(ProfileAttributes profAttr)
profAttr - a ProfileAttributes value.public void setResourceAttributes(ResourceAttributes resAttr)
resAttr - a ResourceAttributes value.public Map getProfileElements()
String) to ProfileElement.public URI getURI()
public void addToModel(com.hp.hpl.jena.rdf.model.Model model)
model - Model to which to add the profile and its related descriptions.public Node toXML(Document doc) throws DOMException
toXML in interface Documentabledoc - The document that will own this node.DOMException - If an error occurs creating the XML nodes.public Node toXMLWithoutElements(Document doc) throws DOMException
doc - The document that will own this node.DOMException - If an error occurs creating the XML nodes.public static Document createProfilesDocument()
public static Document createProfileDocument()
public static void main(String[] argv) throws Throwable
argv - Command-line arguments, of which there should be one, the name of XML file containing the profile to parseThrowable - if an error occurs.Copyright © 1999-2015 Apache OODT. All Rights Reserved.