Interface AspectMetaModelResourceResolver
-
public interface AspectMetaModelResourceResolverProvides functionality to resolve Aspect Meta Model resources which reside in the classpath.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default io.vavr.control.Try<AspectModelUrn>getAspectModelUrn(String uri)Parses an Aspect (meta) model URN into anAspectModelUrndefault io.vavr.control.Try<VersionNumber>getBammVersion(org.apache.jena.rdf.model.Model model)Retrieves the meta model version an Aspect model usesSet<VersionNumber>getUsedMetaModelVersions(org.apache.jena.rdf.model.Model model)Retrieves the set of meta model versions used in a modelStream<org.apache.jena.rdf.model.Statement>listAspectStatements(org.apache.jena.rdf.model.Model sourceModel, org.apache.jena.rdf.model.Model target)Provides the Aspect statements based on the specific BAMM Meta Model versionio.vavr.control.Try<VersionedModel>mergeMetaModelIntoRawModel(org.apache.jena.rdf.model.Model rawModel, VersionNumber version)Returns theVersionedModelfor a loaded raw Aspect model that includes the given rawModeland the model which is the rawModel merged with the corresponding meta model
-
-
-
Method Detail
-
mergeMetaModelIntoRawModel
io.vavr.control.Try<VersionedModel> mergeMetaModelIntoRawModel(org.apache.jena.rdf.model.Model rawModel, VersionNumber version)
Returns theVersionedModelfor a loaded raw Aspect model that includes the given rawModeland the model which is the rawModel merged with the corresponding meta model- Parameters:
rawModel- The given raw Aspect modelversion- The meta model version the model corresponds to- Returns:
- the VersionedModel containing the model, meta model version and raw model
-
getAspectModelUrn
default io.vavr.control.Try<AspectModelUrn> getAspectModelUrn(String uri)
Parses an Aspect (meta) model URN into anAspectModelUrn- Parameters:
uri- The Aspect (meta) model URN- Returns:
- The
AspectModelUrnif parsing succeeds, anUrnSyntaxExceptionotherwise
-
getBammVersion
default io.vavr.control.Try<VersionNumber> getBammVersion(org.apache.jena.rdf.model.Model model)
Retrieves the meta model version an Aspect model uses- Parameters:
model- The RDF model containing an Aspect Model- Returns:
- A
Try.Successwith the used meta model version, or aTry.Failurewith one ofMissingMetaModelVersionException,MultipleMetaModelVersionsExceptionorUnsupportedVersionException(if the version can not be parsed).
-
listAspectStatements
Stream<org.apache.jena.rdf.model.Statement> listAspectStatements(org.apache.jena.rdf.model.Model sourceModel, org.apache.jena.rdf.model.Model target)
Provides the Aspect statements based on the specific BAMM Meta Model version- Parameters:
sourceModel- the source modeltarget- the target model- Returns:
- stream of statements
-
getUsedMetaModelVersions
Set<VersionNumber> getUsedMetaModelVersions(org.apache.jena.rdf.model.Model model)
Retrieves the set of meta model versions used in a model- Parameters:
model- the model- Returns:
- the set of meta model versions
-
-