java.lang.Object
org.openprovenance.prov.model.NamespaceGatherer
- All Implemented Interfaces:
StatementAction
Utility class to traverse a document, register all namespaces occurring in
QualifiedNames
and attributes as well as associated prefixes, and create a Namespace datastructure.- Author:
- lavm
-
Constructor Summary
ConstructorsConstructorDescriptionNamespaceGatherer(Hashtable<String, String> prefixes, String defaultNamespace) -
Method Summary
Modifier and TypeMethodDescriptionstatic NamespaceaccumulateAllNamespaces(Document document) Accumulate all namespace declarations in a singleNamespaceinstance.voiddoAction(ActedOnBehalfOf del) voidvoidvoiddoAction(AlternateOf alt) voiddoAction(Bundle bu, ProvUtilities u) voidvoidvoidvoidvoidvoidvoidvoidvoidvoiddoAction(SpecializationOf spec) voidvoiddoAction(WasAssociatedWith assoc) voiddoAction(WasAttributedTo attr) voiddoAction(WasDerivedFrom der) voiddoAction(WasEndedBy end) voiddoAction(WasGeneratedBy gen) voiddoAction(WasInfluencedBy inf) voiddoAction(WasInformedBy inf) voiddoAction(WasInvalidatedBy inv) voiddoAction(WasStartedBy start) voidvoidvoidvoidvoidregisterLocation(List<Location> locations) voidregisterOther(List<Other> others) voidvoidvoidregisterRole(List<Role> roles) voidregisterType(List<Type> types) voidregisterValue(Value val2)
-
Constructor Details
-
NamespaceGatherer
public NamespaceGatherer() -
NamespaceGatherer
-
-
Method Details
-
accumulateAllNamespaces
Accumulate all namespace declarations in a singleNamespaceinstance. This includes the Document-levelNamespacebut also all Bundle-levelNamespaces.This method is particular useful before serialization to XML since JAXB doesn't offer us the means to generate prefix declaration in inner Elements. Hence, all namespaces need to be declared at the root of the xml document.
- Parameters:
document- Document from which Namespaces are accumulated- Returns:
- a new instance of
Namespace
-
getNamespace
-
registerLocation
-
registerPotentialQualifiedName
-
register
-
registerType
-
register
-
registerRole
-
register
-
registerOther
-
register
-
registerValue
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
registerProvExt
public void registerProvExt() -
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-
doAction
- Specified by:
doActionin interfaceStatementAction
-