public class ResourceMapModifier
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AGENT_URI |
static java.lang.String |
AGGREGATION |
static java.lang.String |
baseURI |
static java.lang.String |
CITO_NAMESPACE |
static java.lang.String |
DEFAULT_CN_URI |
static java.lang.String |
ORE_TER_NAMESPACE |
static java.lang.String |
RDF_NAMESPACE |
static java.lang.String |
RESOLVE |
static java.lang.String |
SLASH |
static java.lang.String |
TERM_NAMESPACE |
Constructor and Description |
---|
ResourceMapModifier(org.dataone.service.types.v1.Identifier oldResourceMapId,
java.io.InputStream originalResourceMap,
org.dataone.service.types.v1.Identifier newResourceMapId)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static com.hp.hpl.jena.rdf.model.Resource |
getResource(com.hp.hpl.jena.rdf.model.Model model,
java.lang.String id)
Get the Resource object which has the given identifier
|
java.util.List<org.dataone.service.types.v1.Identifier> |
getSubjectsOfDocumentedBy(org.dataone.service.types.v1.Identifier metadataId)
Get all subjects of the triple - * is documentedBy metadataId on the resource map
|
void |
replaceObsoletedId(org.dataone.service.types.v1.Identifier obsoletedId,
org.dataone.service.types.v1.Identifier newId,
java.io.OutputStream newResourceMap,
org.dataone.service.types.v1.Subject subject)
Create new resource map by replacing obsoleted ids by new ids.
|
public static final java.lang.String DEFAULT_CN_URI
public static final java.lang.String SLASH
public static final java.lang.String RESOLVE
public static final java.lang.String TERM_NAMESPACE
public static final java.lang.String CITO_NAMESPACE
public static final java.lang.String ORE_TER_NAMESPACE
public static final java.lang.String RDF_NAMESPACE
public static final java.lang.String AGGREGATION
public static final java.lang.String AGENT_URI
public static java.lang.String baseURI
public ResourceMapModifier(org.dataone.service.types.v1.Identifier oldResourceMapId, java.io.InputStream originalResourceMap, org.dataone.service.types.v1.Identifier newResourceMapId)
oldResourceMapId
- the identifier of the old resource map which will be modifiedoriginalResourceMap
- the content of original resource mapnewResourceMapId
- the identifier of the new resource map which will be generatedpublic void replaceObsoletedId(org.dataone.service.types.v1.Identifier obsoletedId, org.dataone.service.types.v1.Identifier newId, java.io.OutputStream newResourceMap, org.dataone.service.types.v1.Subject subject) throws java.io.UnsupportedEncodingException
obsoletedId
- the pid will be replacednewId
- the pid will be used to replace the old pidnewResourceMap
- the place where the created new resource map will be writtensubject
- the subject who generates the resource mapjava.io.UnsupportedEncodingException
public static com.hp.hpl.jena.rdf.model.Resource getResource(com.hp.hpl.jena.rdf.model.Model model, java.lang.String id)
model
- the model where the query will be appliedid
- the identifier of the Resource object haspublic java.util.List<org.dataone.service.types.v1.Identifier> getSubjectsOfDocumentedBy(org.dataone.service.types.v1.Identifier metadataId)
metadataId
- the id of object on the triple (it always be a metadata id). If it is null, it will be anything.Copyright © 2020 Regents of the University of California. All Rights Reserved.