@Platform(include="<nix/Section.hpp>") @Platform(value="linux",link="nix@.1",preload="hdf5@.7") @Platform(value="windows",link="nix",preload={"hdf5","msvcp120","msvcr120","szip","zlib"})
@Namespace(value="nix")
public class Section
extends NamedEntity
| Constructor and Description |
|---|
Section()
Constructor that creates an uninitialized Section.
|
| Modifier and Type | Method and Description |
|---|---|
Property |
createProperty(String name,
int dtype)
Add a new Property that does not have any Values to this Section.
|
Property |
createProperty(String name,
List<Value> values)
Add a new Property with values to the Section.
|
Property |
createProperty(String name,
Value value)
Add a new Property to the Section.
|
Section |
createSection(String name,
String type)
Adds a new child section.
|
boolean |
deleteProperty(Property property)
Deletes the Property from this section.
|
boolean |
deleteProperty(String nameOrId)
Delete the Property identified by its name or id.
|
boolean |
deleteSection(Section section)
Deletes a subsection from this Section.
|
boolean |
deleteSection(String nameOrId)
Deletes a section from the section.
|
List<Section> |
findRelated()
Find all related sections of the section.
|
List<Section> |
findRelated(java.util.function.Predicate<Section> filter)
Find all related sections of the section.
|
List<Section> |
findSections()
Get all descendant sections of the section recursively.
|
List<Section> |
findSections(int maxDepth)
Get all descendant sections of the section recursively.
|
List<Section> |
findSections(java.util.function.Predicate<Section> filter)
Get all descendant sections of the section recursively.
|
List<Section> |
findSections(java.util.function.Predicate<Section> filter,
int maxDepth)
Get all descendant sections of the section recursively.
|
void |
forceCreatedAt(Date date)
Sets the creation date to the provided value even if the attribute is set.
|
void |
forceUpdatedAt()
Sets the time of the last update to the current time.
|
Date |
getCreatedAt()
Get the creation date of the section.
|
String |
getDefinition()
Getter for the definition of the section.
|
String |
getId()
Get id of the section.
|
List<Property> |
getInheritedProperties()
Returns all Properties inherited from a linked section.
|
Section |
getLink()
Get the linked section.
|
String |
getMapping()
Gets the mapping information.
|
String |
getName()
Getter for the name of the section.
|
Section |
getParent()
Returns the parent section.
|
List<Property> |
getProperties()
Get all properties of the section.
|
Property |
getProperty(long index)
Gets the property defined by its index.
|
Property |
getProperty(String nameOrId)
Gets the Property identified by its name or id.
|
long |
getPropertyCount()
Gets the number of properties of this section.
|
String |
getRepository()
Gets the repository URL.
|
Section |
getSection(long index)
Get a child section by its index.
|
Section |
getSection(String nameOrId)
Get a specific child section by its name or id.
|
long |
getSectionCount()
Get the number of child section of the section.
|
List<Section> |
getSections()
Get all direct child sections of the section.
|
List<Section> |
getSections(java.util.function.Predicate<Section> filter)
Get all direct child sections of the section.
|
String |
getType()
Getter for the type of the section.
|
Date |
getUpdatedAt()
Get the date of the last update.
|
boolean |
hasProperty(Property property)
Checks if a Property exists in this Section.
|
boolean |
hasProperty(String nameOrId)
Checks if a Property with this name/id exists in this Section.
|
boolean |
hasSection(Section section)
Checks whether a section has a certain child section.
|
boolean |
hasSection(String nameOrId)
Checks whether a section has a certain child section.
|
boolean |
isNone()
Check if entity is null
|
void |
removeLink()
Deleter for the linked section.
|
void |
setCreatedAt()
Sets the creation time to the current time if the field is not set.
|
void |
setDefinition(String definition)
Setter for the definition of the section.
|
void |
setLink(Section link)
Establish a link to another section.
|
void |
setLink(String id)
Establish a link to another section.
|
void |
setMapping(String mapping)
Sets the mapping information for this section.
|
void |
setRepository(String repository)
Set the repository in which a section of this type is defined.
|
void |
setType(String type)
Setter for the type of the section.
|
void |
setUpdatedAt()
Sets the time of the last update to the current time if the field is not set.
|
String |
toString() |
compareToisInitializedpublic Section()
Calling any method on an uninitialized section will throw a RuntimeException.
@Cast(value="bool") public boolean isNone()
ImplContainerisNone in class ImplContainer@Name(value="id") @StdString public String getId()
public Date getCreatedAt()
getCreatedAt in class Entitypublic Date getUpdatedAt()
getUpdatedAt in class Entitypublic void setUpdatedAt()
setUpdatedAt in class Entitypublic void forceUpdatedAt()
forceUpdatedAt in class Entitypublic void setCreatedAt()
setCreatedAt in class Entitypublic void forceCreatedAt(Date date)
forceCreatedAt in class Entitydate - The creation date to set.@Name(value="type")
public void setType(@StdString
String type)
setType in class NamedEntitytype - The type of the section.@Name(value="type") @StdString public String getType()
getType in class NamedEntity@Name(value="name") @StdString public String getName()
getName in class NamedEntitypublic void setDefinition(String definition)
setDefinition in class NamedEntitydefinition - definition of section. If null is passed definition is removed.public String getDefinition()
getDefinition in class NamedEntitypublic void setRepository(String repository)
Usually this information is provided in the form of an URL
repository - URL to the repository. If null is passed repository is removed.public String getRepository()
@Name(value="link")
public void setLink(@StdString
String id)
The linking section inherits the properties defined in the linked section. Properties of the same name are overridden.
id - The id of the section that should be linked.Section@Name(value="link")
public void setLink(@Const @ByRef
Section link)
The linking section inherits the properties defined in the linked section. Properties of the same name are overridden.
link - The section to link with.Sectionpublic Section getLink()
Sectionpublic void removeLink()
This just removes the link between both sections, but does not remove the linked section from the file.
public void setMapping(String mapping)
The mapping is provided as a path or URL to another section.
mapping - The mapping information to this section. If null is passed mapping is removed.public String getMapping()
public Section getParent()
Each section which is not a root section has a parent.
Section@Name(value="sectionCount") public long getSectionCount()
Section@Cast(value="bool")
public boolean hasSection(@StdString
String nameOrId)
nameOrId - Name or id of requested section.Section@Cast(value="bool")
public boolean hasSection(@Const @ByRef
Section section)
section - The section to check.Sectionpublic Section getSection(String nameOrId)
nameOrId - The name or the ID of the child section.Sectionpublic Section getSection(long index)
index - The index of the child.Sectionpublic List<Section> getSections()
Sectionpublic List<Section> getSections(java.util.function.Predicate<Section> filter)
The parameter filter can be used to filter sections by various criteria.
filter - A filter function.Sectionpublic List<Section> findSections(java.util.function.Predicate<Section> filter, int maxDepth)
This method traverses the sub-tree of all child sections of the section. The traversal is accomplished via breadth first and can be limited in depth. On each node or section a filter is applied. If the filter returns true the respective section will be added to the result list.
filter - A filter function.maxDepth - The maximum depth of traversal.Sectionpublic List<Section> findSections(java.util.function.Predicate<Section> filter)
This method traverses the sub-tree of all child sections of the section. The traversal is accomplished via breadth first. On each node or section a filter is applied. If the filter returns true the respective section will be added to the result list. By default nodes at all depths are considered.
filter - A filter function.Sectionpublic List<Section> findSections(int maxDepth)
This method traverses the sub-tree of all child sections of the section. The traversal is accomplished via breadth first. On each node or section a filter is applied. If the filter returns true the respective section will be added to the result list. By default a filter is used that accepts all sections.
maxDepth - The maximum depth of traversal.Sectionpublic List<Section> findSections()
This method traverses the sub-tree of all child sections of the section. The traversal is accomplished via breadth first. On each node or section a filter is applied. If the filter returns true the respective section will be added to the result list. By default a filter is used that accepts all sections at all depths.
Sectionpublic List<Section> findRelated(java.util.function.Predicate<Section> filter)
filter - A filter function.Sectionpublic List<Section> findRelated()
Sectionpublic Section createSection(String name, String type)
name - The name of the new sectiontype - The type of the sectionSection@Cast(value="bool")
public boolean deleteSection(@StdString
String nameOrId)
nameOrId - Name or id of the child section to delete.Section@Cast(value="bool")
public boolean deleteSection(@Const @ByRef
Section section)
section - The section to delete.Section@Name(value="propertyCount") public long getPropertyCount()
Property@Cast(value="bool")
public boolean hasProperty(@StdString
String nameOrId)
nameOrId - Name or id of the property.Property@Cast(value="bool")
public boolean hasProperty(@Const @ByRef
Property property)
property - The Property to check.Propertypublic Property getProperty(String nameOrId)
nameOrId - Name or id of the property.Propertypublic Property getProperty(long index)
index - The index of the property.Propertypublic List<Property> getProperties()
Propertypublic List<Property> getInheritedProperties()
Propertypublic Property createProperty(String name, int dtype)
name - The name of the property.dtype - The DataType of the property.Propertypublic Property createProperty(String name, Value value)
name - The name of the property.value - The Value to be stored.Propertypublic Property createProperty(String name, List<Value> values)
name - The name of the property.values - The values of the created property.Property@Cast(value="bool")
public boolean deleteProperty(@StdString
String nameOrId)
nameOrId - Name or id of the property.Property@Cast(value="bool")
public boolean deleteProperty(@Const @ByRef
Property property)
property - The Property to delete.Propertypublic String toString()
toString in class org.bytedeco.javacpp.PointerCopyright © 2016. All rights reserved.