eu.transformproject.provenance.opm.factory
public class OPMFactory extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.ArrayList<java.lang.String> |
COLORS |
static Ontology |
DEFAULT_ONTO
The default ontology object.
|
static int |
ENTITY_TYPE_SIZE
The Constant ENTITY_TYPE_SIZE.
|
static java.util.HashMap<EntityType,java.lang.Class> |
opmClasses
The OPM classes.
|
static java.util.Map<DependenceType,OPMDependenceType> |
opmDependenceTypes
The OPM dependence types.
|
static java.util.Map<EntityType,OPMEntityType> |
opmEntityTypes
The OPM entity types.
|
static java.lang.String |
UNKNOWN_ID
The unknown id.
|
static java.lang.String |
UNKNOWN_VALUE
The unknown value.
|
| Constructor and Description |
|---|
OPMFactory() |
| Modifier and Type | Method and Description |
|---|---|
static OPMAnnotation |
addAnnotation(OPMEntity subjectEntity,
Property prop,
java.lang.String value)
Adds the annotation.
|
static OPMAnnotation |
addAnnotation(OPMEntity subjectEntity,
Property prop,
java.lang.String value,
boolean recreateEntityType) |
static OPMAnnotation |
addAnnotation(OPMEntity subjectEntity,
Property prop,
java.lang.String value,
OPMEntityType entityType,
boolean updateLinks) |
static OPMAnnotation |
addAnnotation(OPMEntity subjectEntity,
java.lang.String iriproperty,
Ontologies ontos,
java.lang.String value) |
static void |
addAnnotations(OPMEntity entity,
AnnotationSet annotations,
Ontologies ontologies)
Adds the annotations.
|
static void |
addOPMEntityToGraph(OPMGraph g,
OPMEntity entity)
Adds the opm entity to graph.
|
static OPMEntity |
clone(OPMEntity e)
Clone.
|
static OPMEntity |
clone(OPMEntity e,
java.util.HashMap<OPMEntity,OPMEntity> cloneMap)
Clone.
|
static OPMEntityType |
clone(OPMEntityType et)
Clone.
|
static OPMAccount |
cloneAccount(OPMAccount acc,
java.util.HashMap<OPMEntity,OPMEntity> cloneMap)
Clone account.
|
static OPMAgent |
cloneAgent(OPMAgent e,
java.util.HashMap<OPMEntity,OPMEntity> cloneMap)
Clone agent.
|
static OPMAnnotation |
cloneAnnotation(OPMAnnotation ann,
java.util.HashMap<OPMEntity,OPMEntity> cloneMap)
Clone annotation.
|
static void |
cloneAnnotationOf(OPMEntity e1,
OPMAnnotation a)
Clone annotation of.
|
static OPMArtifact |
cloneArtifact(OPMArtifact e,
java.util.HashMap<OPMEntity,OPMEntity> cloneMap)
Clone artifact.
|
static OPMDependence |
cloneDependence(OPMDependence dep)
Clone dependence.
|
static OPMDependence |
cloneDependence(OPMDependence dep,
java.util.HashMap<OPMEntity,OPMEntity> cloneMap)
Clone dependence.
|
static OPMGraph |
cloneGraph(OPMGraph g,
java.util.HashMap<OPMEntity,OPMEntity> cloneMap)
Clone graph.
|
static OPMGraph |
cloneGraph(OPMGraph g,
java.util.HashSet<OPMEntity> includedEntities)
Clone graph.
|
static OPMEntity |
cloneOPMEntity(OPMEntity e,
java.util.HashMap<OPMEntity,OPMEntity> cloneMap)
Clone opm entity.
|
static OPMProcess |
cloneProcess(OPMProcess e,
java.util.HashMap<OPMEntity,OPMEntity> cloneMap)
Clone process.
|
static java.util.HashSet<OPMAnnotation> |
convertToOPMAnnotations(OPMEntity entity,
AnnotationSet annotations,
Ontologies ontologies)
Convert to opm annotations.
|
static OPMAnnotation |
createAnnotation(OPMEntity entity,
Property p,
java.lang.String value)
Creates a new OPM object.
|
static OPMDependence |
createDependence(OPMEntityNode entityCause,
OPMEntityNode entityEffect)
Creates a new OPM object.
|
static OPMDependence |
createDependence(OPMEntityNode entityCause,
OPMEntityNode entityEffect,
java.lang.String id,
java.lang.String value,
boolean updateLinks)
Creates a new OPM object.
|
static OPMDependence |
createDependence(OPMEntityNode entityCause,
OPMEntityNode entityEffect,
java.lang.String id,
java.lang.String value,
OPMDependenceType deptype,
OPMEntityType entityDependenceType)
Creates a new OPM object.
|
static OPMDependence |
createDependence(OPMEntityNode entityCause,
OPMEntityNode entityEffect,
java.lang.String id,
java.lang.String value,
OPMDependenceType deptype,
OPMEntityType entityDependenceType,
boolean linkDepCauseEffect)
Creates a new OPM object.
|
static OPMDependenceType |
createDependenceType(DependenceType dt)
Creates a new OPM object.
|
static OPMEntityType |
createEntityType(EntityType et)
Creates a new OPM object.
|
static Ontology |
createOntology(java.lang.String ontologyName,
java.lang.String ontologyId,
java.lang.String ontologyVersion)
Creates a new OPM object.
|
static OPMAccount |
createOPMAccount(java.lang.String id,
java.lang.String value)
Creates a new OPM object.
|
static OPMAccount |
createOPMAccount(java.lang.String id,
java.lang.String value,
OPMEntityType entityAccountType)
Creates a new OPM object.
|
static OPMAgent |
createOPMAgent(java.lang.String id,
java.lang.String value)
Creates a new OPM object.
|
static OPMAgent |
createOPMAgent(java.lang.String id,
java.lang.String value,
OPMEntityType entityAgentType) |
static OPMAnnotation |
createOPMAnnotation(java.lang.String id,
java.lang.String value)
Creates a new OPM object.
|
static OPMAnnotation |
createOPMAnnotation(java.lang.String id,
java.lang.String value,
OPMEntityType entityAnnotationType)
Creates a new OPM object.
|
static OPMArtifact |
createOPMArtifact(java.lang.String id,
java.lang.String value)
Creates a new OPM object.
|
static OPMArtifact |
createOPMArtifact(java.lang.String id,
java.lang.String value,
OPMEntityType entityArtifactType) |
static OPMEntity |
createOPMEntity(EntityType et)
Creates a new OPM object.
|
static OPMEntity |
createOPMEntity(EntityType et,
java.lang.String id)
Creates a new OPM object.
|
static OPMEntity |
createOPMEntity(EntityType et,
java.lang.String id,
java.lang.String value)
Creates a new OPM object.
|
static OPMEntity |
createOPMEntity(EntityType et,
java.lang.String id,
java.lang.String value,
AnnotationSet annots,
Ontologies ontos)
Creates a new OPM object.
|
static OPMEntity |
createOPMEntity(EntityType et,
java.lang.String id,
java.lang.String value,
AnnotationSet annots,
Ontologies ontos,
OPMEntityType entityType)
Creates a new OPM object.
|
static OPMEntity |
createOPMEntity(OPMEntityType et)
Creates a new OPM object.
|
static OPMEntity |
createOPMEntity(OPMEntityType et,
java.lang.String id)
Creates a new OPM object.
|
static OPMEntity |
createOPMEntity(OPMEntityType et,
java.lang.String id,
java.lang.String value)
Creates a new OPM object.
|
static OPMEntity |
createOPMEntity(java.lang.String type)
Creates a new OPM object.
|
static OPMEntity |
createOPMEntity(java.lang.String type,
java.lang.String id)
Creates a new OPM object.
|
static OPMEntity |
createOPMEntity(java.lang.String type,
java.lang.String id,
java.lang.String value)
Creates a new OPM object.
|
static OPMEntity |
createOPMEntity(java.lang.String type,
java.lang.String id,
java.lang.String value,
AnnotationSet annots,
Ontologies ontos)
Creates a new OPM object.
|
static OPMGraph |
createOPMGraph()
Creates a new OPM object.
|
static OPMGraph |
createOPMGraph(java.lang.String id,
java.lang.String value)
Creates a new OPM object.
|
static OPMGraph |
createOPMGraph(java.lang.String id,
java.lang.String value,
OPMEntityType entityGraphType)
Creates a new OPM object.
|
static OPMProcess |
createOPMProcess(java.lang.String id,
java.lang.String value)
Creates a new OPM object.
|
static OPMProcess |
createOPMProcess(java.lang.String id,
java.lang.String value,
OPMEntityType entityProcessType) |
static ProcessStatus |
createProcessStatus(java.lang.String processStatus,
java.lang.String desc)
Creates a new OPM object.
|
static Property |
createProperty(Ontology ontology,
java.lang.String iriproperty)
Creates a new OPM object.
|
static java.lang.String |
generateSVG(OPMGraph g)
Generate svg.
|
static java.lang.String |
generateSVG(OPMGraph g,
java.util.HashMap<java.lang.String,java.lang.String> acronyms) |
static java.lang.String |
generateSVG(OPMGraph g,
java.util.HashSet<java.lang.String> entitiesURITohighligh,
ProvenanceServer server,
java.util.HashMap<java.lang.String,java.lang.String> acronyms)
Generate svg.
|
static DependenceType |
getDependenceType(OPMEntityNode entityCause,
OPMEntityNode entityEffect) |
static EntityType |
getEntityType(OPMEntityNode etemplate)
Gets the entity type.
|
static java.util.Collection<? extends OPMEntity> |
getRelatedEntities(OPMEntity e,
java.util.HashSet<java.lang.String> entityURIs,
ProvenanceServer provenanceServer)
Gets the related entities.
|
static java.util.Collection<? extends OPMEntity> |
getRelatedEntities(OPMEntity e,
java.util.HashSet<java.lang.String> entityURIs,
ProvenanceServer provenanceServer,
java.util.HashSet<OPMEntity> reviewed)
Gets the related entities.
|
static void |
initializeopmDependenceTypes(java.util.Map<DependenceType,OPMDependenceType> dependenceTypeMap)
Initialize the OPM dependence types.
|
static void |
initializeopmEntityTypes(java.util.Map<EntityType,OPMEntityType> entityTypeMap)
Initialize the OPM entity types.
|
static java.util.HashMap<OPMEntity,OPMEntity> |
mergeIn_withmapping(OPMGraph g1,
OPMGraph g2,
java.util.HashMap<OPMEntity,OPMEntity> currMapping,
boolean updateGraphLinks)
Merge in_withmapping.
|
static OPMGraph |
mergeIn(OPMGraph g1,
OPMGraph g2,
boolean updateGraphLinks)
Merge in.
|
static OPMEntity |
simpleClone(OPMEntity e) |
static OPMEntity |
simpleClone(OPMEntity e,
boolean addAnnotations)
Simple clone.
|
static java.lang.String |
toDOT(OPMGraph g,
java.util.HashSet<java.lang.String> entitiesURITohighligh,
ProvenanceServer server,
java.util.HashMap<java.lang.String,java.lang.String> accronyms)
To dot.
|
static java.lang.String |
toString(OPMGraph g)
To string.
|
public static Ontology DEFAULT_ONTO
public static java.lang.String UNKNOWN_ID
public static java.lang.String UNKNOWN_VALUE
public static final int ENTITY_TYPE_SIZE
public static java.util.ArrayList<java.lang.String> COLORS
public static java.util.Map<EntityType,OPMEntityType> opmEntityTypes
public static java.util.Map<DependenceType,OPMDependenceType> opmDependenceTypes
public static java.util.HashMap<EntityType,java.lang.Class> opmClasses
public static void initializeopmEntityTypes(java.util.Map<EntityType,OPMEntityType> entityTypeMap)
entityTypeMap: - the entity type mappublic static void initializeopmDependenceTypes(java.util.Map<DependenceType,OPMDependenceType> dependenceTypeMap)
dependenceTypeMap - the dependence type mappublic static OPMEntityType createEntityType(EntityType et)
et: - the entity type of the object to createpublic static OPMDependenceType createDependenceType(DependenceType dt)
dt: - the dependence type of the object to createpublic static OPMEntity createOPMEntity(java.lang.String type, java.lang.String id, java.lang.String value, AnnotationSet annots, Ontologies ontos)
type - the typeid - the idvalue - the valueannots - the annotspublic static OPMEntity createOPMEntity(java.lang.String type, java.lang.String id, java.lang.String value)
type - the typeid - the idvalue - the valuepublic static OPMEntity createOPMEntity(java.lang.String type, java.lang.String id)
type - the typeid - the idpublic static OPMEntity createOPMEntity(java.lang.String type)
type - the typepublic static OPMEntity createOPMEntity(EntityType et, java.lang.String id, java.lang.String value)
et - the etid - the idvalue - the valuepublic static OPMEntity createOPMEntity(OPMEntityType et, java.lang.String id, java.lang.String value) throws java.lang.Exception
et - the etid - the idvalue - the valuejava.lang.Exceptionpublic static OPMEntity createOPMEntity(EntityType et, java.lang.String id)
et - the etid - the idpublic static OPMEntity createOPMEntity(OPMEntityType et, java.lang.String id) throws java.lang.Exception
et - the etid - the idjava.lang.Exceptionpublic static OPMEntity createOPMEntity(EntityType et)
et - the etpublic static OPMEntity createOPMEntity(OPMEntityType et) throws java.lang.Exception
et - the etjava.lang.Exceptionpublic static OPMEntity createOPMEntity(EntityType et, java.lang.String id, java.lang.String value, AnnotationSet annots, Ontologies ontos)
et - the etid - the idvalue - the valueannots - the annotsjava.lang.Exceptionpublic static OPMEntity createOPMEntity(EntityType et, java.lang.String id, java.lang.String value, AnnotationSet annots, Ontologies ontos, OPMEntityType entityType) throws java.lang.Exception
et - the etid - the idvalue - the valueannots - the annotsjava.lang.Exceptionpublic static OPMArtifact createOPMArtifact(java.lang.String id, java.lang.String value)
id - the idvalue - the valuepublic static OPMArtifact createOPMArtifact(java.lang.String id, java.lang.String value, OPMEntityType entityArtifactType) throws java.lang.Exception
java.lang.Exceptionpublic static OPMProcess createOPMProcess(java.lang.String id, java.lang.String value)
id - the idvalue - the valuepublic static OPMProcess createOPMProcess(java.lang.String id, java.lang.String value, OPMEntityType entityProcessType) throws java.lang.Exception
java.lang.Exceptionpublic static OPMAgent createOPMAgent(java.lang.String id, java.lang.String value)
id - the idvalue - the valuepublic static OPMAgent createOPMAgent(java.lang.String id, java.lang.String value, OPMEntityType entityAgentType) throws java.lang.Exception
java.lang.Exceptionpublic static OPMAccount createOPMAccount(java.lang.String id, java.lang.String value)
id - the idvalue - the valuepublic static OPMAccount createOPMAccount(java.lang.String id, java.lang.String value, OPMEntityType entityAccountType) throws java.lang.Exception
id - the idvalue - the valuejava.lang.Exceptionpublic static OPMGraph createOPMGraph(java.lang.String id, java.lang.String value)
id - the idvalue - the valuepublic static OPMGraph createOPMGraph(java.lang.String id, java.lang.String value, OPMEntityType entityGraphType) throws java.lang.Exception
id - the idvalue - the valuejava.lang.Exceptionpublic static OPMAnnotation createOPMAnnotation(java.lang.String id, java.lang.String value)
id - the idvalue - the valuepublic static OPMAnnotation createOPMAnnotation(java.lang.String id, java.lang.String value, OPMEntityType entityAnnotationType) throws java.lang.Exception
id - the idvalue - the valuejava.lang.Exceptionpublic static OPMGraph createOPMGraph()
public static void addOPMEntityToGraph(OPMGraph g, OPMEntity entity)
g - the gentity - the entitypublic static Ontology createOntology(java.lang.String ontologyName, java.lang.String ontologyId, java.lang.String ontologyVersion)
ontologyName - the ontology nameontologyId - the ontology idontologyVersion - the ontology versionpublic static Property createProperty(Ontology ontology, java.lang.String iriproperty)
ontology - the ontologyiriproperty - the iripropertypublic static OPMDependence createDependence(OPMEntityNode entityCause, OPMEntityNode entityEffect) throws java.lang.Exception
entityCause - the entity causeentityEffect - the entity effectjava.lang.Exception - the exceptionpublic static DependenceType getDependenceType(OPMEntityNode entityCause, OPMEntityNode entityEffect) throws java.lang.Exception
java.lang.Exceptionpublic static OPMDependence createDependence(OPMEntityNode entityCause, OPMEntityNode entityEffect, java.lang.String id, java.lang.String value, boolean updateLinks) throws java.lang.Exception
entityCause - the entity causeentityEffect - the entity effectid - the idvalue - the valuejava.lang.Exception - the exceptionpublic static OPMDependence createDependence(OPMEntityNode entityCause, OPMEntityNode entityEffect, java.lang.String id, java.lang.String value, OPMDependenceType deptype, OPMEntityType entityDependenceType) throws java.lang.Exception
entityCause - the entity causeentityEffect - the entity effectid - the idvalue - the valuejava.lang.Exception - the exceptionpublic static OPMDependence createDependence(OPMEntityNode entityCause, OPMEntityNode entityEffect, java.lang.String id, java.lang.String value, OPMDependenceType deptype, OPMEntityType entityDependenceType, boolean linkDepCauseEffect) throws java.lang.Exception
entityCause - the entity causeentityEffect - the entity effectid - the idvalue - the valuejava.lang.Exception - the exceptionpublic static OPMAnnotation addAnnotation(OPMEntity subjectEntity, java.lang.String iriproperty, Ontologies ontos, java.lang.String value) throws java.lang.Exception
java.lang.Exceptionpublic static OPMAnnotation addAnnotation(OPMEntity subjectEntity, Property prop, java.lang.String value)
subjectEntity - the subject entityprop - the propvalue - the valuepublic static OPMAnnotation addAnnotation(OPMEntity subjectEntity, Property prop, java.lang.String value, boolean recreateEntityType)
public static OPMAnnotation addAnnotation(OPMEntity subjectEntity, Property prop, java.lang.String value, OPMEntityType entityType, boolean updateLinks)
public static java.lang.String toString(OPMGraph g)
g - the gpublic static OPMGraph cloneGraph(OPMGraph g, java.util.HashMap<OPMEntity,OPMEntity> cloneMap) throws java.lang.Exception
g - the gcloneMap - the clone mapjava.lang.Exception - the exceptionpublic static OPMGraph cloneGraph(OPMGraph g, java.util.HashSet<OPMEntity> includedEntities) throws java.lang.Exception
g - the gincludedEntities - the included entitiesjava.lang.Exception - the exceptionpublic static OPMGraph mergeIn(OPMGraph g1, OPMGraph g2, boolean updateGraphLinks) throws java.lang.Exception
g1 - the g1g2 - the g2java.lang.Exception - the exceptionpublic static java.util.HashMap<OPMEntity,OPMEntity> mergeIn_withmapping(OPMGraph g1, OPMGraph g2, java.util.HashMap<OPMEntity,OPMEntity> currMapping, boolean updateGraphLinks) throws java.lang.Exception
g1 - the g1g2 - the g2currMapping - the curr mappingjava.lang.Exception - the exceptionpublic static OPMEntity simpleClone(OPMEntity e, boolean addAnnotations) throws java.lang.Exception
e - the ejava.lang.Exceptionpublic static OPMEntity simpleClone(OPMEntity e) throws java.lang.Exception
java.lang.Exceptionpublic static void cloneAnnotationOf(OPMEntity e1, OPMAnnotation a)
e1 - the e1a - the apublic static OPMEntity clone(OPMEntity e) throws java.lang.Exception
e - the ejava.lang.Exception - the exceptionpublic static OPMEntity clone(OPMEntity e, java.util.HashMap<OPMEntity,OPMEntity> cloneMap) throws java.lang.Exception
e - the ecloneMap - the clone mapjava.lang.Exception - the exceptionpublic static OPMArtifact cloneArtifact(OPMArtifact e, java.util.HashMap<OPMEntity,OPMEntity> cloneMap) throws java.lang.Exception
e - the ecloneMap - the clone mapjava.lang.Exception - the exceptionpublic static OPMAgent cloneAgent(OPMAgent e, java.util.HashMap<OPMEntity,OPMEntity> cloneMap) throws java.lang.Exception
e - the ecloneMap - the clone mapjava.lang.Exception - the exceptionpublic static OPMProcess cloneProcess(OPMProcess e, java.util.HashMap<OPMEntity,OPMEntity> cloneMap) throws java.lang.Exception
e - the ecloneMap - the clone mapjava.lang.Exception - the exceptionpublic static OPMEntity cloneOPMEntity(OPMEntity e, java.util.HashMap<OPMEntity,OPMEntity> cloneMap) throws java.lang.Exception
e - the ecloneMap - the clone mapjava.lang.Exception - the exceptionpublic static OPMEntityType clone(OPMEntityType et)
et - the etpublic static OPMAccount cloneAccount(OPMAccount acc, java.util.HashMap<OPMEntity,OPMEntity> cloneMap) throws java.lang.Exception
acc - the acccloneMap - the clone mapjava.lang.Exception - the exceptionpublic static OPMAnnotation cloneAnnotation(OPMAnnotation ann, java.util.HashMap<OPMEntity,OPMEntity> cloneMap) throws java.lang.Exception
ann - the anncloneMap - the clone mapjava.lang.Exception - the exceptionpublic static OPMDependence cloneDependence(OPMDependence dep) throws java.lang.Exception
dep - the depjava.lang.Exception - the exceptionpublic static OPMDependence cloneDependence(OPMDependence dep, java.util.HashMap<OPMEntity,OPMEntity> cloneMap) throws java.lang.Exception
dep - the depcloneMap - the clone mapjava.lang.Exception - the exceptionpublic static ProcessStatus createProcessStatus(java.lang.String processStatus, java.lang.String desc)
processStatus - the process statusdesc - the descpublic static OPMAnnotation createAnnotation(OPMEntity entity, Property p, java.lang.String value)
entity - the entityp - the pvalue - the valuepublic static java.util.HashSet<OPMAnnotation> convertToOPMAnnotations(OPMEntity entity, AnnotationSet annotations, Ontologies ontologies)
entity - the entityannotations - the annotationsontologies - the ontologiespublic static EntityType getEntityType(OPMEntityNode etemplate)
etemplate - the etemplatepublic static void addAnnotations(OPMEntity entity, AnnotationSet annotations, Ontologies ontologies)
entity - the entityannotations - the annotationsontologies - the ontologiespublic static java.lang.String toDOT(OPMGraph g, java.util.HashSet<java.lang.String> entitiesURITohighligh, ProvenanceServer server, java.util.HashMap<java.lang.String,java.lang.String> accronyms) throws java.lang.Exception
g - the gentitiesURITohighligh - the entities uri tohighlighserver - the serverjava.lang.Exception - the exceptionpublic static java.lang.String generateSVG(OPMGraph g) throws java.lang.Exception
g - the gjava.lang.Exception - the exceptionpublic static java.lang.String generateSVG(OPMGraph g, java.util.HashMap<java.lang.String,java.lang.String> acronyms) throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String generateSVG(OPMGraph g, java.util.HashSet<java.lang.String> entitiesURITohighligh, ProvenanceServer server, java.util.HashMap<java.lang.String,java.lang.String> acronyms) throws java.lang.Exception
g - the gentitiesURITohighligh - the entities uri tohighlighserver - the serverjava.lang.Exception - the exceptionpublic static java.util.Collection<? extends OPMEntity> getRelatedEntities(OPMEntity e, java.util.HashSet<java.lang.String> entityURIs, ProvenanceServer provenanceServer)
e - the eentityURIs - the entity uri isprovenanceServer - the provenance serverpublic static java.util.Collection<? extends OPMEntity> getRelatedEntities(OPMEntity e, java.util.HashSet<java.lang.String> entityURIs, ProvenanceServer provenanceServer, java.util.HashSet<OPMEntity> reviewed)
e - the eentityURIs - the entity ur isprovenanceServer - the provenance serverreviewed - the reviewed