| java.lang.Object org.ontoware.semversion.VersionedItem org.ontoware.semversion.Version
Version | public class Version extends VersionedItem (Code) | | A SemVersion Version. Each version is a non-mutable state of an RDF model. A
version has a number of metadata attached to it. Each version is identified
by a URI. A
VersionedModel has none or one root version. Each version
can have a number of chuld versions. Versions can have branch labels. The
default branch is called 'main'.
Each model can have a number of 'suggested' children. Suggestions can have
further children, but these must also be suggestions.
Example:
root
- version 1
- version 2
- version 2.1 (suggestion)
- version 2.1.1 (must be a suggestion)
- version 2.2
- version 2.3
author: voelkel |
Method Summary | |
public Version | commit(Diff diff, String comment, URI versionURI, URI provenance, boolean suggestion) | public Version | commit(Model childContent, String comment, boolean suggestion) | public Version | commit(Model childContent, String comment, URI versionURI, URI provenance, boolean suggestion) Create a new child version by committing explicitly the content of the
child. | public Version | commitAsBranch(Diff diff, String branchLabel, String comment, URI versionURI, URI provenance, boolean suggestion) Commit a new version by applying a diff to this versions content. | public Version | commitAsBranch(Model childContent, String branchLabel, String comment, boolean suggestion) | public Version | commitAsBranch(Model childContent, String branchLabel, String comment, URI versionURI, URI provenance, boolean suggestion) Creates a new child version with the given URI. | public void | delete() | public String | dump() | public boolean | equals(Object other) | public List<Version> | getAllChildren() | public String | getBranchLabel() | public String | getChangeCause() | public Model | getContent() | protected Version | getFirstParent() | public List<Version> | getNextVersions() | public Version | getPrevVersion() | protected org.ontoware.semversion.impl.generated.Version | getReactorVersion() | public Version | getSecondParent() the second parent (a Version) if this version has been the resultof a merge. | public long | getStatementCount() | public List<Version> | getSuggestions() | public List<Version> | getValidChildren() all valid children of this version (i.e. | public VersionedModel | getVersionedModel() | protected boolean | hasChildWithSameBranchLabel() | public boolean | hasValidChildren() | public boolean | isInSameBranch(Version other) | public boolean | isSuggestion() | public boolean | isValid() true if this version is an accepted version (i.e. | public Version | merge(Version otherVersion, String comment, URI provenance, boolean suggestion) | public void | setAsRelease() | public void | setAsSuggestion() | protected void | setChangeCause(String value) | protected void | setContainer(VersionedModel value) | protected void | setContent(RDFModel rdfmodel) | protected void | setFirstParent(Version value) | protected void | setInvalid() | protected void | setValid() |
Version | public Version(Model model, Session session, URI uri, boolean write)(Code) | | SHOULD NOT BE CALLED FROM API USERS
Parameters: model - Parameters: uri - Parameters: write - |
commit | public Version commit(Model childContent, String comment, URI versionURI, URI provenance, boolean suggestion)(Code) | | Create a new child version by committing explicitly the content of the
child. The new version has the given URI.
Parameters: childContent - Parameters: comment - Parameters: versionURI - Parameters: provenance - Parameters: suggestion - |
delete | public void delete()(Code) | | |
dump | public String dump()(Code) | | a String which contains all content of this model in aself-invented strange format. |
getAllChildren | public List<Version> getAllChildren()(Code) | | all child versions (suggestions and accepted) of this version |
getBranchLabel | public String getBranchLabel()(Code) | | the branch label of this version |
getChangeCause | public String getChangeCause()(Code) | | the change cause |
getContent | public Model getContent()(Code) | | a an in-memory copy of the RDF content of this model |
getFirstParent | protected Version getFirstParent()(Code) | | predecessor, which is always a Version |
getNextVersions | public List<Version> getNextVersions()(Code) | | all accepted child versions (including suggestions) |
getPrevVersion | public Version getPrevVersion()(Code) | | the first parent |
getSecondParent | public Version getSecondParent()(Code) | | the second parent (a Version) if this version has been the resultof a merge. Return null otherwise. |
getStatementCount | public long getStatementCount()(Code) | | the size of the versioned RDF graph of this version |
getSuggestions | public List<Version> getSuggestions()(Code) | | all suggestions to this version |
getValidChildren | public List<Version> getValidChildren()(Code) | | all valid children of this version (i.e. children that are not asuggestion) |
hasChildWithSameBranchLabel | protected boolean hasChildWithSameBranchLabel()(Code) | | |
hasValidChildren | public boolean hasValidChildren()(Code) | | true if this version has at least one valid child version |
isInSameBranch | public boolean isInSameBranch(Version other)(Code) | | Parameters: other - true if this version has the same branch label as the otherversion |
isSuggestion | public boolean isSuggestion()(Code) | | true if this version is just a suggested version that has notbeen accepted yet |
isValid | public boolean isValid()(Code) | | true if this version is an accepted version (i.e. not asuggestion) |
setAsRelease | public void setAsRelease()(Code) | | Changes the flag from "suggestion" to "released"
|
setAsSuggestion | public void setAsSuggestion()(Code) | | Changes the flag from "released" to "suggestion"
|
setChangeCause | protected void setChangeCause(String value)(Code) | | |
setInvalid | protected void setInvalid()(Code) | | Sets this version as invalid (= suggestion)
|
setValid | protected void setValid()(Code) | | |
|
|