Class Content

java.lang.Object
org.ivoa.dm.registry.voresource.Content
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>

@Entity @VoDml(id="VOResource:Content", role=objectType) public class Content extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Information regarding the general content of a resource . objectType: Content
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • subject

      @VoDml(id="VOResource:Content.subject", role=attribute, type="ivoa:string", typeRole=primitiveType) protected List<String> subject
      a topic, object type, or other descriptive keywords about the resource. Terms for Subject should be drawn from the Unified Astronomy Thesaurus (http://astrothesaurus.org). : Attribute subject : multiplicity 1..*
    • description

      @VoDml(id="VOResource:Content.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String description
      An account of the nature of the resource The description may include but is not limited to an abstract, table of contents, reference to a graphical representation of content or a free-text account of the content. Note that description is xs:string-typed, which means that whitespace is considered significant. Clients should render empty lines as paragraph boundaries and ideally refrain from reflowing material that looks formatted (i.e., is broken to about 80-character lines). : Attribute description : multiplicity 1
    • source

      @VoDml(id="VOResource:Content.source", role=attribute, type="VOResource:Source", typeRole=dataType) protected Source source
      a bibliographic reference from which the present resource is derived or extracted. This is intended to point to an article in the published literature. An ADS Bibcode is recommended as a value when available. : Attribute source : multiplicity 0..1
    • referenceURL

      @VoDml(id="VOResource:Content.referenceURL", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected String referenceURL
      URL pointing to a human-readable document describing this resource. : Attribute referenceURL : multiplicity 1
    • type

      @VoDml(id="VOResource:Content.type", role=attribute, type="ivoa:string", typeRole=primitiveType) protected List<String> type
      Nature or genre of the content of the resource. Values for type should be taken from the controlled vocabulary http://www.ivoa.net/rdf/voresource/content_type . : Attribute type : multiplicity 0..*
    • contentLevel

      @VoDml(id="VOResource:Content.contentLevel", role=attribute, type="ivoa:string", typeRole=primitiveType) protected List<String> contentLevel
      Description of the content level or intended audience. Values for contentLevel should be taken from the controlled vocabulary http://www.ivoa.net/rdf/voresource/content_level. : Attribute contentLevel : multiplicity 0..*
    • relationship

      @VoDml(id="VOResource:Content.relationship", role=composition, type="VOResource:Relationship", typeRole=objectType) protected List<Relationship> relationship
      a description of a relationship to another resource. composition relationship : ( Multiplicity : 0..* )
  • Constructor Details

    • Content

      public Content()
      Creates a new Content
    • Content

      public Content(List<String> subject, String description, Source source, String referenceURL, List<String> type, List<String> contentLevel, List<Relationship> relationship)
      full parameter constructor.
      Parameters:
      subject - a topic, object type, or other descriptive keywords about the resource. Terms for Subject should be drawn from the Unified Astronomy Thesaurus (http://astrothesaurus.org).
      description - An account of the nature of the resource The description may include but is not limited to an abstract, table of contents, reference to a graphical representation of content or a free-text account of the content. Note that description is xs:string-typed, which means that whitespace is considered significant. Clients should render empty lines as paragraph boundaries and ideally refrain from reflowing material that looks formatted (i.e., is broken to about 80-character lines).
      source - a bibliographic reference from which the present resource is derived or extracted. This is intended to point to an article in the published literature. An ADS Bibcode is recommended as a value when available.
      referenceURL - URL pointing to a human-readable document describing this resource.
      type - Nature or genre of the content of the resource. Values for type should be taken from the controlled vocabulary http://www.ivoa.net/rdf/voresource/content_type .
      contentLevel - Description of the content level or intended audience. Values for contentLevel should be taken from the controlled vocabulary http://www.ivoa.net/rdf/voresource/content_level.
      relationship - a description of a relationship to another resource.
    • Content

      public Content(Content other)
      Copy Constructor. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
      Returns:
      the id
    • updateUsing

      public void updateUsing(Content other)
      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.
    • getSubject

      public List<String> getSubject()
      Returns subject Attribute.
      Returns:
      subject Attribute
    • setSubject

      public void setSubject(List<String> pSubject)
      Set subject Attribute.
      Parameters:
      pSubject - value to set
    • withSubject

      public Content withSubject(List<String> pSubject)
      fluent setter for subject Attribute.
      Parameters:
      pSubject - value to set
      Returns:
      Content
    • getDescription

      public String getDescription()
      Returns description Attribute.
      Returns:
      description Attribute
    • setDescription

      public void setDescription(String pDescription)
      Set description Attribute.
      Parameters:
      pDescription - value to set
    • withDescription

      public Content withDescription(String pDescription)
      fluent setter for description Attribute.
      Parameters:
      pDescription - value to set
      Returns:
      Content
    • getSource

      public Source getSource()
      Returns source Attribute.
      Returns:
      source Attribute
    • setSource

      public void setSource(Source pSource)
      Set source Attribute.
      Parameters:
      pSource - value to set
    • withSource

      public Content withSource(Source pSource)
      fluent setter for source Attribute.
      Parameters:
      pSource - value to set
      Returns:
      Content
    • getReferenceURL

      public String getReferenceURL()
      Returns referenceURL Attribute.
      Returns:
      referenceURL Attribute
    • setReferenceURL

      public void setReferenceURL(String pReferenceURL)
      Set referenceURL Attribute.
      Parameters:
      pReferenceURL - value to set
    • withReferenceURL

      public Content withReferenceURL(String pReferenceURL)
      fluent setter for referenceURL Attribute.
      Parameters:
      pReferenceURL - value to set
      Returns:
      Content
    • getType

      public List<String> getType()
      Returns type Attribute.
      Returns:
      type Attribute
    • setType

      public void setType(List<String> pType)
      Set type Attribute.
      Parameters:
      pType - value to set
    • withType

      public Content withType(List<String> pType)
      fluent setter for type Attribute.
      Parameters:
      pType - value to set
      Returns:
      Content
    • getContentLevel

      public List<String> getContentLevel()
      Returns contentLevel Attribute.
      Returns:
      contentLevel Attribute
    • setContentLevel

      public void setContentLevel(List<String> pContentLevel)
      Set contentLevel Attribute.
      Parameters:
      pContentLevel - value to set
    • withContentLevel

      public Content withContentLevel(List<String> pContentLevel)
      fluent setter for contentLevel Attribute.
      Parameters:
      pContentLevel - value to set
      Returns:
      Content
    • getRelationship

      public List<Relationship> getRelationship()
      Returns relationship composition as an immutable list.
      Returns:
      relationship composition.
    • setRelationship

      public void setRelationship(List<Relationship> pRelationship)
      Defines whole relationship composition.
      Parameters:
      pRelationship - composition to set.
    • addToRelationship

      public void addToRelationship(Relationship p)
      Add a org.ivoa.dm.registry.voresource.Relationship to the composition.
      Parameters:
      p - org.ivoa.dm.registry.voresource.Relationship to add
    • removeFromRelationship

      public void removeFromRelationship(Relationship p)
      Remove a org.ivoa.dm.registry.voresource.Relationship from the composition.
      Parameters:
      p - org.ivoa.dm.registry.voresource.Relationship to remove
    • replaceInRelationship

      public void replaceInRelationship(Relationship _p)
      update a org.ivoa.dm.registry.voresource.Relationship in the composition.
      Parameters:
      _p - org.ivoa.dm.registry.voresource.Relationship to update the match is done via the database key
    • createContent

      public static Content createContent(Consumer<Content.ContentBuilder> f)
      create a Content in functional builder style.
      Parameters:
      f - the functional builder.
      Returns:
      an object initialized from the builder.
    • forceLoad

      public void forceLoad()
      Specified by:
      forceLoad in interface org.ivoa.vodml.jpa.JPAManipulations
    • delete

      public void delete(jakarta.persistence.EntityManager em)
      Specified by:
      delete in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>