public class PDThesaur extends ObjPD
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
fDESCRIP |
static java.lang.String |
fGRANTPARENTID |
static java.lang.String |
fLANG |
static java.lang.String |
fNAME |
static java.lang.String |
fPARENTID |
static java.lang.String |
fPDID |
static java.lang.String |
fPDID2 |
static java.lang.String |
fSCN |
static java.lang.String |
fUSE |
static java.lang.String |
ROOTTERM |
AllowedChars, fPDAUTOR, fPDDATE, SYN_ADD, SYN_DEL, SYN_PARENT, SYN_SEP, SYN_THES, XML_Attr, XML_Field, XML_Group, XML_GroupMembers, XML_ListAttr, XML_Metadata, XML_OPDList, XML_OPDObject, XML_User, XML_UserMembers
Constructor and Description |
---|
PDThesaur(DriverGeneric Drv)
Deafult costructor
|
Modifier and Type | Method and Description |
---|---|
void |
AddLang(java.util.HashSet memLang)
Adds a list of Id of Terms as translations Relations to the current Term
|
void |
AddRT(java.util.HashSet memRT)
Adds a list of Id of Terms as Relations to the current Term
|
void |
assignValues(Record Rec)
Generic "abstract" method for assigning a Record Values to an OPD Object
|
void |
delete()
Deletes the Thesaur and all the documents and subThesaurs contained recursively
If the number of Thesaurs, documents and levels is too big, this method can
create problems in the rollback of the database storing the metadata
|
void |
DeleteTermLang()
Deletes all the relationship/translations terms current id
|
void |
DeleteTermRT()
Deletes all the relationship/related terms current id
|
void |
Export(java.lang.String ExpThesId,
java.io.PrintWriter PW,
java.lang.String Root,
java.lang.String MainLang)
Exports a thesaurus to RDF-XML format
|
void |
Export(java.lang.String ExpThesId,
java.lang.String Path,
java.lang.String Root,
java.lang.String MainLang)
Exports a thesaurus to RDF-XML format
|
java.lang.String |
GenerateId()
Generates a new Id using the Openprodoc algorithm used for docs or folders
|
java.lang.String |
getDescription() |
java.lang.String |
GetIdChild(java.lang.String ParentId,
java.lang.String TermName)
Returns the Id of a Term with name TermName child of Term ParentId
|
java.lang.String |
getIDThesaur() |
static java.lang.String |
getImportReport()
returns the Report created after importing a SKOS file
|
java.lang.String |
getLang() |
java.util.Vector |
getList(java.util.HashSet IdList)
Creates a Cursot containing all the termm with the PDID included in IdList
|
java.util.HashSet |
getListDescendList(java.lang.String PDId)
Search and returns a Set containing the list of all narrow terms of a term
|
java.util.HashSet |
getListDirectDescendList(java.lang.String PDId)
Return a list of all the Thesaurs of any type whose DIRECT parent is PDId
|
java.util.HashSet |
getListGrandParentList(java.lang.String Parent)
Search and return all de hierachy of parent terms, including the therausus
|
java.util.HashSet |
getListLang(java.lang.String TermId)
Obtain a list of the Codes of translation terms
|
java.util.HashSet |
getListRT(java.lang.String TermId)
Obtain a list of the Codes of related terms
|
java.util.HashSet |
getListUF(java.lang.String TermId)
Obtain a list of the Codes of Used For terms
|
java.lang.String |
getName() |
java.lang.String |
getParentId() |
java.lang.String |
getPDId() |
Record |
getRecord()
Returns a record with the current values
|
static Record |
getRecordStructPDThesaur()
Returns the fixed structure of thesaur
|
java.lang.String |
getSCN() |
static java.lang.String |
getTableName()
Static method that returns the name of Thesaur table in DDBB
|
static java.lang.String |
getTableNameThesLang()
static method
|
static java.lang.String |
getTableNameThesLev()
static method
|
static java.lang.String |
getTableNameThesRT()
static method
|
java.lang.String |
getTabName()
object "method" needed because static overloading doesn't work in java
Returns the name of Thesaur table in DDBB
|
java.lang.String |
getUse() |
int |
Import(java.lang.String ThesName,
java.lang.String ImpThesId,
java.io.File XMLFile,
java.lang.String MainLang,
java.lang.String Root,
boolean SubThesLang,
boolean Transact,
boolean RetainCodes)
Import a thesaurus in RDF-XML format
|
int |
Import(java.lang.String ThesName,
java.lang.String ImpThesId,
java.io.InputStream XMLFile,
java.lang.String MainLang,
java.lang.String Root,
boolean SubThesLang,
boolean Transact,
boolean RetainCodes)
Import a thesaurus in RDF-XML format
|
PDThesaur |
ImportXMLNode(org.w3c.dom.Node OPDObject,
java.lang.String ParentThesaurId,
boolean MaintainId)
Evaluates a XML Node and generates a Term
|
void |
insert()
creates a new term of the Thesaurus
|
Cursor |
ListLang(java.lang.String TermId)
Obtain a CURSOR of the Records of translation terms
|
Cursor |
ListNT(java.lang.String TermId)
Obtain a CURSOR of
Record of narrow terms |
Cursor |
ListRT(java.lang.String TermId)
Obtain a CURSOR of the Records of related terms
|
java.util.HashSet |
ListThes()
List all the Thesaurs
|
Cursor |
ListUF(java.lang.String TermId)
Creates a Cursor with the terms UF
|
Record |
Load(java.lang.String Ident)
Loads a Term/Thesaurus
|
Cursor |
LoadList(java.util.HashSet IdList)
Creates a Cursot containing all the termm with the PDID included in IdList
|
PDThesaur |
NextTerm(Cursor Res)
Receives a cursor created with method Search and returns the next Term or null if
there are no more.
|
PDThesaur |
ProcessXML(java.io.File XMLFile,
java.lang.String ParentThesaurId)
Process a File containing a set of terms
|
Cursor |
Search(Conditions AttrConds,
boolean SubThesaurs,
java.lang.String IdActFold,
java.util.Vector Ord)
Search for Thesaurs returning a cursor with the results of Thesaurs with the
indicated values of fields.
|
void |
setDescription(java.lang.String pDescription) |
void |
setLang(java.lang.String pLang) |
void |
setName(java.lang.String pName) |
void |
setParentId(java.lang.String pParentId) |
void |
setPDId(java.lang.String pPDId) |
void |
setSCN(java.lang.String SCN) |
void |
setUse(java.lang.String Use) |
java.lang.String |
toString() |
void |
update()
Updates the metadata of the Thesaur
|
CheckName, Clear, EndXML, getAll, getDrv, getPDAutor, getPDDate, Install, ProcesXMLNode, SearchLike, SearchLikeDesc, SearchQBE, SearchSelect, SearchSelectV, setDrv, StartXML, String2BD, toXML, unInstall
public static final java.lang.String fPDID
public static final java.lang.String fNAME
public static final java.lang.String fDESCRIP
public static final java.lang.String fUSE
public static final java.lang.String fLANG
public static final java.lang.String fSCN
public static final java.lang.String fPDID2
public static final java.lang.String ROOTTERM
public static final java.lang.String fPARENTID
public static final java.lang.String fGRANTPARENTID
public PDThesaur(DriverGeneric Drv) throws PDException
Drv
- OpenProdoc SessionPDException
- in any errorpublic void assignValues(Record Rec) throws PDException
ObjPD
assignValues
in class ObjPD
Rec
- Record to be assignedPDException
- in any errorpublic java.lang.String getPDId()
public void setPDId(java.lang.String pPDId) throws PDExceptionFunc
pPDId
- the id of Thesaur or termPDExceptionFunc
- in any errorpublic java.lang.String getName()
public void setName(java.lang.String pName) throws PDExceptionFunc
pName
- Name of thesaur or termPDExceptionFunc
- in any errorpublic java.lang.String getTabName()
getTabName
in class ObjPD
public static java.lang.String getTableName()
public static java.lang.String getTableNameThesLev()
public static java.lang.String getTableNameThesRT()
public static java.lang.String getTableNameThesLang()
public Record getRecord() throws PDException
getRecord
in class ObjPD
PDException
- in any errorpublic static Record getRecordStructPDThesaur() throws PDException
PDException
- in any errorpublic void insert() throws PDException
insert
in class ObjPD
PDException
- in any errorpublic java.lang.String getParentId()
public void setParentId(java.lang.String pParentId)
pParentId
- id of thesaur or broad termpublic java.lang.String GenerateId()
public java.util.HashSet getListGrandParentList(java.lang.String Parent) throws PDException
Parent
- id of parent for looking forPDException
- in any errorpublic java.util.HashSet getListDescendList(java.lang.String PDId) throws PDException
PDId
- Id of thermPDException
- in any errorpublic void delete() throws PDException
delete
in class ObjPD
PDException
- in any problem and cancels the Transaction. When enough permissions throws PDFuncException.public void DeleteTermRT() throws PDException
PDException
- in any errorpublic void DeleteTermLang() throws PDException
PDException
- in any errorpublic void update() throws PDException
update
in class ObjPD
PDException
- in any errorpublic java.util.HashSet getListDirectDescendList(java.lang.String PDId) throws PDException
PDId
- Id of the parent ThesaurPDException
- in any errorpublic Record Load(java.lang.String Ident) throws PDException
Load
in class ObjPD
Ident
- Id of element to loadPDException
- in any errorpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String GetIdChild(java.lang.String ParentId, java.lang.String TermName) throws PDException
ParentId
- id of parent TermTermName
- name of child TermPDException
- if the Thesaur dosen't exist or the user it'snt allowedpublic Cursor Search(Conditions AttrConds, boolean SubThesaurs, java.lang.String IdActFold, java.util.Vector Ord) throws PDException
AttrConds
- Conditions over the fields ofthe ThesaurTypeSubThesaurs
- if true seach in actual Thesaur AND subThesaurs, if false, serach in ALL the structureIdActFold
- Thesaur to start the search. if null, start in the root levelOrd
- Vector with the names of attributes for Order of resultsPDException
- when occurs any problempublic PDThesaur NextTerm(Cursor Res) throws PDException
Res
- Cursor created with method Search and serevral parametersPDException
- when occurs any problempublic PDThesaur ImportXMLNode(org.w3c.dom.Node OPDObject, java.lang.String ParentThesaurId, boolean MaintainId) throws PDException
OPDObject
- XML NodeParentThesaurId
- OpenProdoc Id of Parent ElementMaintainId
- when true, the Id of Term will be maintained, otherwise, a new Id will be generatedPDException
- in any errorpublic PDThesaur ProcessXML(java.io.File XMLFile, java.lang.String ParentThesaurId) throws PDException
XMLFile
- File to importParentThesaurId
- Id of thesaur where importPDException
- in any errorpublic java.lang.String getDescription()
public void setDescription(java.lang.String pDescription) throws PDExceptionFunc
pDescription
- Description to setPDExceptionFunc
- in any errorpublic java.lang.String getUse()
public void setUse(java.lang.String Use)
Use
- the Use to setpublic java.util.HashSet ListThes() throws PDException
PDException
- in any errorpublic java.util.HashSet getListRT(java.lang.String TermId) throws PDException
TermId
- Id of term to look for relationsPDException
- in any errorpublic java.util.HashSet getListLang(java.lang.String TermId) throws PDException
TermId
- Id of term to look for translationsPDException
- in any errorpublic Cursor ListNT(java.lang.String TermId) throws PDException
Record
of narrow termsTermId
- If of Term to look for narrow termsPDException
- in any errorpublic Cursor ListRT(java.lang.String TermId) throws PDException
TermId
- Id of term to llok for relationsPDException
- in any errorpublic Cursor ListLang(java.lang.String TermId) throws PDException
TermId
- Id of Term to look for translationsPDException
- in any errorpublic java.util.HashSet getListUF(java.lang.String TermId) throws PDException
TermId
- If of term to look for UFPDException
- in any errorpublic Cursor ListUF(java.lang.String TermId) throws PDException
TermId
- Id of Term to look for UFPDException
- in any errorpublic Cursor LoadList(java.util.HashSet IdList) throws PDException
IdList
- List of IdsPDException
- in an errorpublic java.util.Vector getList(java.util.HashSet IdList) throws PDException
IdList
- List of IdsPDException
- in an errorpublic java.lang.String getIDThesaur() throws PDException
PDException
public void AddRT(java.util.HashSet memRT) throws PDException
memRT
- HasSet of Id of TermsPDException
- in any errorpublic void AddLang(java.util.HashSet memLang) throws PDException
memLang
- HasSet of Id of TermsPDException
- in any errorpublic java.lang.String getSCN()
public void setSCN(java.lang.String SCN)
SCN
- the SCN to setpublic java.lang.String getLang()
public void setLang(java.lang.String pLang)
pLang
- the Lang to setpublic void Export(java.lang.String ExpThesId, java.lang.String Path, java.lang.String Root, java.lang.String MainLang) throws PDException
ExpThesId
- thesaurus IdPath
- Complete name of file to exportRoot
- Root to be included in the RDF (i.e. :http://metadataregistry.org/uri/FTWG/ )MainLang
- Language that defines the ID of terms and "walking" of thesaurPDException
- in any errorpublic void Export(java.lang.String ExpThesId, java.io.PrintWriter PW, java.lang.String Root, java.lang.String MainLang) throws PDException
ExpThesId
- thesaurus IdPW
- PrintWriter for printint Thesaur. MUST be closed by calling appicationRoot
- Root to be included in the RDF (i.e. :http://metadataregistry.org/uri/FTWG/ )MainLang
- Language that defines the ID of terms and "walking" of thesaurPDException
- in any errorpublic int Import(java.lang.String ThesName, java.lang.String ImpThesId, java.io.InputStream XMLFile, java.lang.String MainLang, java.lang.String Root, boolean SubThesLang, boolean Transact, boolean RetainCodes) throws PDException
ThesName
- Name of Thesaurus to importImpThesId
- thesaurus IdXMLFile
- File to importRoot
- Root to be included in the RDF (i.e. :http://metadataregistry.org/uri/FTWG/ )MainLang
- Language that defines the ID of terms and "walking" of thesaurSubThesLang
- when true, a subthesaurus by language will be createdTransact
- when true, the import will be transactional (roolback in any error)RetainCodes
- when true, the original codes of terms will be usedPDException
- in any errorpublic int Import(java.lang.String ThesName, java.lang.String ImpThesId, java.io.File XMLFile, java.lang.String MainLang, java.lang.String Root, boolean SubThesLang, boolean Transact, boolean RetainCodes) throws PDException
ThesName
- Name of Thesaurus to importImpThesId
- thesaurus IdXMLFile
- File to importRoot
- Root to be included in the RDF (i.e. :http://metadataregistry.org/uri/FTWG/ )MainLang
- Language that defines the ID of terms and "walking" of thesaurSubThesLang
- when true, a subthesaurus by language will be createdTransact
- when true, the import will be transactional (roolback in any error)RetainCodes
- when true, the original codes of terms will be usedPDException
- in any errorpublic static java.lang.String getImportReport()