001: /*
002: * <copyright>
003: *
004: * Copyright 2002-2004 BBNT Solutions, LLC
005: * under sponsorship of the Defense Advanced Research Projects
006: * Agency (DARPA).
007: *
008: * You can redistribute this software and/or modify it under the
009: * terms of the Cougaar Open Source License as published on the
010: * Cougaar Open Source Website (www.cougaar.org).
011: *
012: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
013: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
014: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
015: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
016: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
017: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
018: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
019: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
020: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
021: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
022: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
023: *
024: * </copyright>
025: */
026:
027: /**
028: * This class describes a OWL profile for Jena. This class will probably
029: * be replaced by a class written by the OWL people, but we need a placeholder
030: * for now.
031: */package org.cougaar.servicediscovery.description;
032:
033: import com.hp.hpl.jena.rdf.model.Property;
034: import com.hp.hpl.jena.rdf.model.Resource;
035: import com.hp.hpl.jena.rdf.model.impl.ResourceImpl;
036: import com.hp.hpl.jena.rdf.model.impl.PropertyImpl;
037: import com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler;
038: import com.hp.hpl.jena.vocabulary.RDF;
039:
040: /**
041: */
042: public class Profile {
043:
044: protected static final String cougaar_uri = "http://cougaar.owl#";
045: protected static final String profile_uri = "http://www.daml.org/services/owl-s/1.0/Profile.owl#";
046: protected static final String service_uri = "http://www.daml.org/services/owl-s/1.0/Service.owl#";
047:
048: //ServiceProfile level properties
049: static String nSERVICEPROFILE = "ServiceProfile";
050: public static Resource SERVICEPROFILE;
051: static String nSERVICECATEGORY = "serviceCategory";
052: public static Property SERVICECATEGORY;
053: static String nCUSTOMERPREFERENCE = "customerPreference";
054: public static Property CUSTOMERPREFERENCE;
055: static String nTEXTDESCRIPTION = "textDescription";
056: public static Property TEXTDESCRIPTION;
057: static String nINPUT = "input";
058: public static Property INPUT;
059: static String nOUTPUT = "output";
060: public static Property OUTPUT;
061: static String nPRESENTEDBY = "isPresentedBy";
062: public static Property PRESENTEDBY;
063: static String nECHELONOFSUPPORT = "echelonOfSupport";
064: public static Property ECHELONOFSUPPORT;
065:
066: //ServiceProvider related properties
067: static String nPROVIDEDBY = "providedBy";
068: public static Property PROVIDEDBY;
069: static String nPROVIDERNAME = "name";
070: public static Property PROVIDERNAME;
071: static String nORGANIZATIONTYPE = "organizationType";
072: public static Property ORGANIZATIONTYPE;
073:
074: //Grounding related properties
075: static String nGROUNDING = "ServiceGrounding";
076: public static Resource GROUNDING;
077: static String nWSDLGROUNDING = "WsdlGrounding";
078: public static Resource WSDLGROUNDING;
079: static String nWSDLDOCUMENT = "wsdlDocument";
080: public static Property BINDINGTYPE;
081: static String nBINDINGTYPE = "bindingType";
082: public static Property WSDLDOCUMENT;
083: static String nSUPPORTEDBY = "isSupportedBy";
084: public static Property SUPPORTEDBY;
085:
086: //ServiceCategory level properties
087: static String nSERVICENAME = "serviceCategoryName";
088: public static Property SERVICENAME;
089: static String nSERVICECODE = "serviceCategoryCode";
090: public static Property SERVICECODE;
091: static String nSERVICESCHEME = "serviceNamingScheme";
092: public static Property SERVICESCHEME;
093: static String nADDITIONALQUALIFICATIONS = "additionalQualification";
094: public static Property ADDITIONALQUALIFICATIONS;
095:
096: //AdditionalQualifications level properties
097: static String nQUALIFICATIONNAME = "qualificationName";
098: public static Property QUALIFICATIONNAME;
099: static String nQUALIFICATIONVALUE = "qualificationValue";
100: public static Property QUALIFICATIONVALUE;
101:
102: static {
103: try {
104: // Use Jena cache, allowing install independent service profiles
105:
106: //ServiceProfile level properties
107: SERVICEPROFILE = new ResourceImpl(cougaar_uri,
108: nSERVICEPROFILE);
109: SERVICECATEGORY = new PropertyImpl(cougaar_uri,
110: nSERVICECATEGORY);
111: CUSTOMERPREFERENCE = new PropertyImpl(cougaar_uri,
112: nCUSTOMERPREFERENCE);
113: TEXTDESCRIPTION = new PropertyImpl(profile_uri,
114: nTEXTDESCRIPTION);
115: OUTPUT = new PropertyImpl(profile_uri, nOUTPUT);
116: INPUT = new PropertyImpl(profile_uri, nINPUT);
117: PRESENTEDBY = new PropertyImpl(service_uri, nPRESENTEDBY);
118: ECHELONOFSUPPORT = new PropertyImpl(cougaar_uri,
119: nECHELONOFSUPPORT);
120:
121: //ServiceProvider related properties
122: PROVIDEDBY = new PropertyImpl(profile_uri, nPROVIDEDBY);
123: PROVIDERNAME = new PropertyImpl(profile_uri, nPROVIDERNAME);
124: ORGANIZATIONTYPE = new PropertyImpl(cougaar_uri,
125: nORGANIZATIONTYPE);
126:
127: //Grounding related properties
128: WSDLGROUNDING = new ResourceImpl(cougaar_uri,
129: nWSDLGROUNDING);
130: WSDLDOCUMENT = new PropertyImpl(cougaar_uri, nWSDLDOCUMENT);
131: SUPPORTEDBY = new PropertyImpl(service_uri, nSUPPORTEDBY);
132: GROUNDING = new PropertyImpl(service_uri, nGROUNDING);
133: BINDINGTYPE = new PropertyImpl(cougaar_uri, nBINDINGTYPE);
134:
135: //ServiceCategory level properties
136: SERVICENAME = new PropertyImpl(cougaar_uri, nSERVICENAME);
137: SERVICECODE = new PropertyImpl(cougaar_uri, nSERVICECODE);
138: SERVICESCHEME = new PropertyImpl(cougaar_uri,
139: nSERVICESCHEME);
140: ADDITIONALQUALIFICATIONS = new PropertyImpl(cougaar_uri,
141: nADDITIONALQUALIFICATIONS);
142:
143: //AdditionalQualifications level properties
144: QUALIFICATIONNAME = new PropertyImpl(cougaar_uri,
145: nQUALIFICATIONNAME);
146: QUALIFICATIONVALUE = new PropertyImpl(cougaar_uri,
147: nQUALIFICATIONVALUE);
148:
149: } catch (Exception e) {
150: RDFDefaultErrorHandler errorHandler = new RDFDefaultErrorHandler();
151: errorHandler.error(e);
152: }
153: }
154: }
|