Package org.ivoa.dm.registry.standard
Class Schema
java.lang.Object
org.ivoa.dm.registry.standard.Schema
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="StandardsRegExt:Schema",
role=objectType)
public class Schema
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
a description of a schema definition.
objectType: Schema
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for Schema, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Longinserted database keyprotected StringA human-readable description of what the schema defines or is used for.A URL pointing to a sample document that illustrates the use of the schema.protected StringA URL pointing to a document that formally defines the schema.protected Stringan identifier for the schema being described. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Schemacreate a Schema in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns description Attribute.Returns example Attribute.getId()Returns location Attribute.Returns namespace Attribute.voidsetDescription(String pDescription) Set description Attribute.voidsetExample(List<String> pExample) Set example Attribute.voidsetLocation(String pLocation) Set location Attribute.voidsetNamespace(String pNamespace) Set namespace Attribute.voidupdateUsing(Schema other) Update this object with the content of the given object.withDescription(String pDescription) fluent setter for description Attribute.withExample(List<String> pExample) fluent setter for example Attribute.withLocation(String pLocation) fluent setter for location Attribute.withNamespace(String pNamespace) fluent setter for namespace Attribute.
-
Field Details
-
_id
inserted database key -
location
@VoDml(id="StandardsRegExt:Schema.location", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected String locationA URL pointing to a document that formally defines the schema. The document should be in a machine-parsable format when applicable. For example, when refering to an XML schema, the document should be an XML Schema or similar document that can be used to validate an instance document. : Attribute location : multiplicity 1 -
description
@VoDml(id="StandardsRegExt:Schema.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String descriptionA human-readable description of what the schema defines or is used for. A brief description--e.g. one statement--is recommended for display purposes. : Attribute description : multiplicity 0..1 -
example
@VoDml(id="StandardsRegExt:Schema.example", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected List<String> exampleA URL pointing to a sample document that illustrates the use of the schema. When applicable (e.g. XML), the document should be in the format defined by the schema document. : Attribute example : multiplicity 0..* -
namespace
@VoDml(id="StandardsRegExt:Schema.namespace", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String namespacean identifier for the schema being described. Each instance of this attribute must be unique within the resourse description. For XML schemas, this should be the schema's namespace URI. Otherwise, it should be a unique label to distinguish it from other schemas described in the same resource description. : Attribute namespace : multiplicity 1
-
-
Constructor Details
-
Schema
public Schema()Creates a new Schema -
Schema
full parameter constructor.- Parameters:
location- A URL pointing to a document that formally defines the schema. The document should be in a machine-parsable format when applicable. For example, when refering to an XML schema, the document should be an XML Schema or similar document that can be used to validate an instance document.description- A human-readable description of what the schema defines or is used for. A brief description--e.g. one statement--is recommended for display purposes.example- A URL pointing to a sample document that illustrates the use of the schema. When applicable (e.g. XML), the document should be in the format defined by the schema document.namespace- an identifier for the schema being described. Each instance of this attribute must be unique within the resourse description. For XML schemas, this should be the schema's namespace URI. Otherwise, it should be a unique label to distinguish it from other schemas described in the same resource description.
-
Schema
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>- Returns:
- the id
-
updateUsing
Update this object with the content of the given object. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
getLocation
Returns location Attribute.- Returns:
- location Attribute
-
setLocation
Set location Attribute.- Parameters:
pLocation- value to set
-
withLocation
fluent setter for location Attribute.- Parameters:
pLocation- value to set- Returns:
- Schema
-
getDescription
Returns description Attribute.- Returns:
- description Attribute
-
setDescription
Set description Attribute.- Parameters:
pDescription- value to set
-
withDescription
fluent setter for description Attribute.- Parameters:
pDescription- value to set- Returns:
- Schema
-
getExample
Returns example Attribute.- Returns:
- example Attribute
-
setExample
Set example Attribute.- Parameters:
pExample- value to set
-
withExample
fluent setter for example Attribute.- Parameters:
pExample- value to set- Returns:
- Schema
-
getNamespace
Returns namespace Attribute.- Returns:
- namespace Attribute
-
setNamespace
Set namespace Attribute.- Parameters:
pNamespace- value to set
-
withNamespace
fluent setter for namespace Attribute.- Parameters:
pNamespace- value to set- Returns:
- Schema
-
createSchema
create a Schema in functional builder style.- Parameters:
f- the functional builder.- Returns:
- an object initialized from the builder.
-
forceLoad
public void forceLoad()- Specified by:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-