Package org.ivoa.dm.executionbroker
Class SimpleDataResource
java.lang.Object
org.ivoa.dm.executionbroker.AbstractComponent
org.ivoa.dm.executionbroker.LifecycleComponent
org.ivoa.dm.executionbroker.AbstractDataResource
org.ivoa.dm.executionbroker.SimpleDataResource
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="execbroker:SimpleDataResource",
role=objectType)
public class SimpleDataResource
extends AbstractDataResource
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A simple downloadable data resource.
objectType: SimpleDataResource
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for SimpleDataResource, mainly for use in the functional builder pattern. -
Field Summary
FieldsFields inherited from class org.ivoa.dm.executionbroker.LifecycleComponent
phase, scheduleFields inherited from class org.ivoa.dm.executionbroker.AbstractComponent
_id, kind, meta -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SimpleDataResourceSimpleDataResource(String location, LifecyclePhase phase, LifecycleSchedule schedule, String kind, ComponentMetadata meta) full parameter constructor.SimpleDataResource(AbstractDataResource superinstance, String location) Constructor from supertype instance.Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncopyMe()make a clone of the object taking into account current polymorhic type.static SimpleDataResourcecreate a SimpleDataResource in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns location Attribute.voidsetLocation(String pLocation) Set location Attribute.voidupdateUsing(SimpleDataResource other) Update this object with the content of the given object.withLocation(String pLocation) fluent setter for location Attribute.Methods inherited from class org.ivoa.dm.executionbroker.AbstractDataResource
updateUsingMethods inherited from class org.ivoa.dm.executionbroker.LifecycleComponent
getPhase, getSchedule, setPhase, setSchedule, updateUsing, withPhase, withScheduleMethods inherited from class org.ivoa.dm.executionbroker.AbstractComponent
getId, getKind, getMeta, setKind, setMeta, updateUsing, withKind, withMetaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType
getId
-
Field Details
-
location
@VoDml(id="execbroker:SimpleDataResource.location", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String locationThe URL of the data to import. : Attribute location : multiplicity 1
-
-
Constructor Details
-
SimpleDataResource
public SimpleDataResource()Creates a new SimpleDataResource -
SimpleDataResource
public SimpleDataResource(String location, LifecyclePhase phase, LifecycleSchedule schedule, String kind, ComponentMetadata meta) full parameter constructor.- Parameters:
location- The URL of the data to import.phase- The lifecycle phase.schedule- The lifecycle schedule.kind- The component type identifier.meta- The component metadata.
-
SimpleDataResource
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
SimpleDataResource
Constructor from supertype instance.- Parameters:
superinstance- The supertype.location- The URL of the data to import.
-
-
Method Details
-
copyMe
make a clone of the object taking into account current polymorhic type.- Specified by:
copyMein classAbstractDataResource- Returns:
- the cloned object.
-
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:
- SimpleDataResource
-
createSimpleDataResource
public static SimpleDataResource createSimpleDataResource(Consumer<SimpleDataResource.SimpleDataResourceBuilder> f) create a SimpleDataResource 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- Overrides:
forceLoadin classAbstractDataResource
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-