Class Caom2Model

java.lang.Object
org.ivoa.dm.caom2.Caom2Model
All Implemented Interfaces:
org.ivoa.vodml.jaxb.JaxbManagement, org.ivoa.vodml.VodmlModel<Caom2Model>

@VoDml(id="caom2", role=model, type="caom2") public class Caom2Model extends Object implements org.ivoa.vodml.VodmlModel<Caom2Model>
The container class for the caom2 Model. a general purpose data model for use as the core data model of an astronomical data centre
  • Field Details

    • modelDescription

      public static final org.ivoa.vodml.ModelDescription modelDescription
      the description.
  • Constructor Details

    • Caom2Model

      public Caom2Model()
      default constructor.
  • Method Details

    • isInVocabulary

      public static boolean isInVocabulary(String value, String vocabulary)
      Test if a term is in the vocabulary.
      Parameters:
      value - the value to test
      vocabulary - the uri for the vocabulary.
      Returns:
      true if the term is in the vocabulary.
    • addContent

      public void addContent(DeletedArtifactDescriptionEvent c)
      add DeletedArtifactDescriptionEvent to model.
      Parameters:
      c - org.ivoa.dm.caom2.DeletedArtifactDescriptionEvent
    • deleteContent

      public void deleteContent(DeletedArtifactDescriptionEvent c)
      remove DeletedArtifactDescriptionEvent from model.
      Parameters:
      c - org.ivoa.dm.caom2.DeletedArtifactDescriptionEvent
    • addContent

      public void addContent(DeletedObservationEvent c)
      add DeletedObservationEvent to model.
      Parameters:
      c - org.ivoa.dm.caom2.DeletedObservationEvent
    • deleteContent

      public void deleteContent(DeletedObservationEvent c)
      remove DeletedObservationEvent from model.
      Parameters:
      c - org.ivoa.dm.caom2.DeletedObservationEvent
    • addContent

      public void addContent(SimpleObservation c)
      add SimpleObservation to model.
      Parameters:
      c - org.ivoa.dm.caom2.SimpleObservation
    • deleteContent

      public void deleteContent(SimpleObservation c)
      remove SimpleObservation from model.
      Parameters:
      c - org.ivoa.dm.caom2.SimpleObservation
    • addContent

      public void addContent(DerivedObservation c)
      add DerivedObservation to model.
      Parameters:
      c - org.ivoa.dm.caom2.DerivedObservation
    • deleteContent

      public void deleteContent(DerivedObservation c)
      remove DerivedObservation from model.
      Parameters:
      c - org.ivoa.dm.caom2.DerivedObservation
    • addContent

      public void addContent(ArtifactDescription c)
      add ArtifactDescription to model.
      Parameters:
      c - org.ivoa.dm.caom2.ArtifactDescription
    • deleteContent

      public void deleteContent(ArtifactDescription c)
      remove ArtifactDescription from model.
      Parameters:
      c - org.ivoa.dm.caom2.ArtifactDescription
    • getContent

      public <T> List<T> getContent(Class<T> c)
      Get the content of the given type.
      Type Parameters:
      T - The type of the content
      Parameters:
      c - the class of the content.
      Returns:
      the content.
    • processReferences

      public void processReferences()
      Specified by:
      processReferences in interface org.ivoa.vodml.jaxb.JaxbManagement
    • hasReferences

      public static boolean hasReferences()
      if the model has references.
      Returns:
      true if the model has references.
    • contextFactory

      public static jakarta.xml.bind.JAXBContext contextFactory() throws jakarta.xml.bind.JAXBException
      the context factory for the model.
      Returns:
      the JAXBContext.
      Throws:
      jakarta.xml.bind.JAXBException - if there is a problem.
    • pu_name

      public static String pu_name()
      The persistence unit name for the model.
      Returns:
      the name.
    • jsonMapper

      public static com.fasterxml.jackson.databind.ObjectMapper jsonMapper()
      Return a Jackson objectMapper suitable for JSON serialzation.
      Returns:
      the objectmapper.
    • management

      public org.ivoa.vodml.ModelManagement<Caom2Model> management()
      generate management interface instance for model.
      Specified by:
      management in interface org.ivoa.vodml.VodmlModel<Caom2Model>
      Returns:
      the management interface.
    • TAPSchema

      public static InputStream TAPSchema()
      the TAP schema for the model. The schema is represented via the TAPSchemaDM datamodel.
      Returns:
      an InputStream to the XML representation of the model.
    • createContext

      public void createContext()
      create a context in preparation for cloning.