Package org.cdlib.mrt.formatter
Class XMLMapper
java.lang.Object
org.cdlib.mrt.formatter.XMLMapper
Provide mapping of State to header and namespaces
Resource entries for XMLMapper take the form:
[typename].header= (required)
[typename].namespace= (optional - if not supplied then assumed empty or id provided)
[typename].id.[property name]= (optional)
- Author:
- dloy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final boolean
protected NSMap.NSEntry
protected String
protected static final String
protected static final String
protected static final String
protected String
protected Properties
protected StateInf
protected String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreturn a header for the XML - this property is requiredGet name of ID used for this namespaceGet this name with namespace if supplied.getProperties
(String resourceName) Gets a resource using the class loaderGet name of ID used for this namespacegetXHTML()
static XMLMapper
getXMLMapper
(String resourceName, StateInf state)
-
Field Details
-
NL
-
NAME
- See Also:
-
MESSAGE
- See Also:
-
DEBUG
protected static final boolean DEBUG- See Also:
-
state
-
prop
-
stateS
-
globalNameSpace
-
nsMapBase
-
entry
-
-
Constructor Details
-
XMLMapper
State must be explicitly included match an instance to assign a type name The type name is used for matchin resource properties- Parameters:
state
- implements StateInf- Throws:
TException
-
-
Method Details
-
getXMLMapper
- Throws:
TException
-
getHeader
return a header for the XML - this property is required- Returns:
- XML header
- Throws:
TException
- XML not found
-
getName
Get this name with namespace if supplied. If individual namespace is supplied for name then use it else use globalname space else not supplied- Parameters:
name
- identifier name- Returns:
- name with extracted namespace
- Throws:
TException
-
getIDName
Get name of ID used for this namespace- Parameters:
name
- identifier name- Returns:
- name with extracted namespace
- Throws:
TException
-
getResourceName
Get name of ID used for this namespace- Parameters:
name
- identifier name- Returns:
- name with extracted namespace
- Throws:
TException
-
getNameSpaceURI
- Throws:
TException
-
getNameSpacePrefix
- Throws:
TException
-
getXHTML
- Throws:
TException
-
getSemanticBase
- Throws:
TException
-
getProperties
Gets a resource using the class loader- Parameters:
resourceName
- Name of the file containing the resource. The name may include a relative path which is interpreted as being relative to the path "resources/" below the classpath root.- Returns:
- An inputstream for the resource
- Throws:
TException
-
dump
-