Package org.ivoa.dm.proposal.prop
Class ProposalModel
java.lang.Object
org.ivoa.dm.proposal.prop.ProposalModel
- All Implemented Interfaces:
org.ivoa.vodml.jaxb.JaxbManagement
,org.ivoa.vodml.VodmlModel<ProposalModel>
@VoDml(id="proposal",
role=model,
type="proposal")
public class ProposalModel
extends Object
implements org.ivoa.vodml.VodmlModel<ProposalModel>
The container class for the proposal Model.
A model to represent an application for observing time. The model is intended to express all
of the concepts required to specify the scientific parameters of the application in sufficient detail to allow the
proposal to be reviewed and allocated time. It does not cover all the technical detail of instrument setup that would be needed to actually schedule the
observations, although the intention is that information about targets etc. could be automatically transferred to an observing system.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A container class for the references in the model. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add ObservingProposal to model.void
directly add reference.void
directly add reference.void
directly add reference.void
addReference
(org.ivoa.dm.stc.coords.CoordSys c) directly add reference.static jakarta.xml.bind.JAXBContext
the context factory for the model.void
create a context in preparation for cloning.void
remove ObservingProposal from model.static org.ivoa.vodml.ModelDescription
Get the model description.org.ivoa.vodml.ModelDescription
Return the model description in non-static fashion.<T> List<T>
getContent
(Class<T> c) Get the content of the given type.static boolean
if the model has references.static boolean
isInVocabulary
(String value, String vocabulary) Test if a term is in the vocabulary.static com.fasterxml.jackson.databind.ObjectMapper
Return a Jackson objectMapper suitable for JSON serialzation.org.ivoa.vodml.ModelManagement<ProposalModel>
generate management interface instance for model.void
static String
pu_name()
The persistence unit name for the model.static void
write an XML schema based on JAXB interpretation.
-
Constructor Details
-
ProposalModel
public ProposalModel()default constructor.
-
-
Method Details
-
isInVocabulary
Test if a term is in the vocabulary.- Parameters:
value
- the value to testvocabulary
- the uri for the vocabulary.- Returns:
- true if the term is in the vocabulary.
-
addContent
add ObservingProposal to model.- Parameters:
c
- org.ivoa.dm.proposal.prop.ObservingProposal
-
deleteContent
remove ObservingProposal from model.- Parameters:
c
- org.ivoa.dm.proposal.prop.ObservingProposal
-
addReference
directly add reference. N.B. should not be necessary in normal operation - adding content should find embedded references.- Parameters:
c
- the reference to be added.
-
addReference
directly add reference. N.B. should not be necessary in normal operation - adding content should find embedded references.- Parameters:
c
- the reference to be added.
-
addReference
directly add reference. N.B. should not be necessary in normal operation - adding content should find embedded references.- Parameters:
c
- the reference to be added.
-
addReference
public void addReference(org.ivoa.dm.stc.coords.CoordSys c) directly add reference. N.B. should not be necessary in normal operation - adding content should find embedded references.- Parameters:
c
- the reference to be added.
-
getContent
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 interfaceorg.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.JAXBExceptionthe context factory for the model.- Returns:
- the JAXBContext.
- Throws:
jakarta.xml.bind.JAXBException
- if there is a problem.
-
pu_name
The persistence unit name for the model.- Returns:
- the name.
-
writeXMLSchema
public static void writeXMLSchema()write an XML schema based on JAXB interpretation. -
jsonMapper
public static com.fasterxml.jackson.databind.ObjectMapper jsonMapper()Return a Jackson objectMapper suitable for JSON serialzation.- Returns:
- the objectmapper.
-
management
generate management interface instance for model.- Specified by:
management
in interfaceorg.ivoa.vodml.VodmlModel<ProposalModel>
- Returns:
- the management interface.
-
description
public static org.ivoa.vodml.ModelDescription description()Get the model description.- Returns:
- the description.
-
descriptor
public org.ivoa.vodml.ModelDescription descriptor()Return the model description in non-static fashion. overrides @see org.ivoa.vodml.VodmlModel#descriptor()- Specified by:
descriptor
in interfaceorg.ivoa.vodml.VodmlModel<ProposalModel>
- Returns:
- the model description.
-
createContext
public void createContext()create a context in preparation for cloning.
-